summaryrefslogtreecommitdiffstats
path: root/lib/kross
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-03-18 12:50:17 +0100
committerSlávek Banko <slavek.banko@axis.cz>2018-03-18 12:50:29 +0100
commit2902213501d5b3d67eba7b8c32085d7957a18601 (patch)
treeac7aa714f4650f7b6e1dac99de37746bdab8f1c1 /lib/kross
parent57a8a8d0de1dedca8caafaf24b1a4f11aec023e2 (diff)
downloadkoffice-2902213501d5b3d67eba7b8c32085d7957a18601.tar.gz
koffice-2902213501d5b3d67eba7b8c32085d7957a18601.zip
Fix FTBFS with Ruby 2.5
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit b08d1cbb1f455971fd1cd82f1e59d20937742187)
Diffstat (limited to 'lib/kross')
-rw-r--r--lib/kross/configure.in.in2
-rw-r--r--lib/kross/ruby/rubyscript.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/kross/configure.in.in b/lib/kross/configure.in.in
index f12c24c7..4af2a49a 100644
--- a/lib/kross/configure.in.in
+++ b/lib/kross/configure.in.in
@@ -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`
diff --git a/lib/kross/ruby/rubyscript.cpp b/lib/kross/ruby/rubyscript.cpp
index 2469706a..381785ff 100644
--- a/lib/kross/ruby/rubyscript.cpp
+++ b/lib/kross/ruby/rubyscript.cpp
@@ -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