Fix FTBFS with Ruby 2.5

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit b08d1cbb1f)
pull/8/head
Slávek Banko 7 years ago
parent 57a8a8d0de
commit 2902213501

@ -36,7 +36,7 @@ if test "x$compile_kross" = "xyes" ; then
RUBY_CFLAGS=`$PKGCONFIG ruby --cflags`
fi
if test -z "$RUBY_VERSION"; then
for RUBY_TEST in 2.3 2.2 2.1 2.0 1.9; do
for RUBY_TEST in 2.5 2.4 2.3 2.2 2.1 2.0 1.9; do
RUBY_VERSION=`$PKG_CONFIG ruby-$RUBY_TEST --modversion 2>/dev/null`
if test -n "$RUBY_VERSION"; then
RUBY_CFLAGS=`$PKG_CONFIG ruby-$RUBY_TEST --cflags`

@ -105,6 +105,7 @@ void RubyScript::compile()
#endif // HAVE_RUBY_1_9
VALUE src = RubyExtension::toVALUE( m_scriptcontainer->getCode() );
StringValue(src);
VALUE name = RubyExtension::toVALUE( m_scriptcontainer->getName() );
#ifdef HAVE_RUBY_1_9
// FIXME
@ -113,7 +114,7 @@ void RubyScript::compile()
rb_thread_critical = Qtrue;
ruby_in_eval++;
#endif // HAVE_RUBY_1_9
rb_funcall(d->m_script, rb_intern("module_eval"), 2, src, (char*) m_scriptcontainer->getName().latin1());
rb_funcall(d->m_script, rb_intern("module_eval"), 2, src, name);
#ifdef HAVE_RUBY_1_9
// FIXME
#else // HAVE_RUBY_1_9

Loading…
Cancel
Save