Fix FTBFS with Ruby 2.5

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 7 years ago
parent cbc1062ce2
commit b08d1cbb1f

@ -36,7 +36,7 @@ if test "x$compile_kross" = "xyes" ; then
RUBY_CFLAGS=`$PKGCONFIG ruby --cflags` RUBY_CFLAGS=`$PKGCONFIG ruby --cflags`
fi fi
if test -z "$RUBY_VERSION"; then 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` RUBY_VERSION=`$PKG_CONFIG ruby-$RUBY_TEST --modversion 2>/dev/null`
if test -n "$RUBY_VERSION"; then if test -n "$RUBY_VERSION"; then
RUBY_CFLAGS=`$PKG_CONFIG ruby-$RUBY_TEST --cflags` RUBY_CFLAGS=`$PKG_CONFIG ruby-$RUBY_TEST --cflags`

@ -105,6 +105,7 @@ void RubyScript::compile()
#endif // HAVE_RUBY_1_9 #endif // HAVE_RUBY_1_9
VALUE src = RubyExtension::toVALUE( m_scriptcontainer->getCode() ); VALUE src = RubyExtension::toVALUE( m_scriptcontainer->getCode() );
StringValue(src); StringValue(src);
VALUE name = RubyExtension::toVALUE( m_scriptcontainer->getName() );
#ifdef HAVE_RUBY_1_9 #ifdef HAVE_RUBY_1_9
// FIXME // FIXME
@ -113,7 +114,7 @@ void RubyScript::compile()
rb_thread_critical = Qtrue; rb_thread_critical = Qtrue;
ruby_in_eval++; ruby_in_eval++;
#endif // HAVE_RUBY_1_9 #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 #ifdef HAVE_RUBY_1_9
// FIXME // FIXME
#else // HAVE_RUBY_1_9 #else // HAVE_RUBY_1_9

Loading…
Cancel
Save