Bug 243565 - kross ruby doesn't compile with ruby 1.9
Summary: kross ruby doesn't compile with ruby 1.9
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
Depends on:
Reported: 2010-07-04 11:16 UTC by Stefano Crocco
Modified: 2013-06-21 12:32 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:

ruby19.patch (28.49 KB, patch)
2013-06-21 11:54 UTC, Johannes Huber
ruby19-cmake.patch (959 bytes, patch)
2013-06-21 11:55 UTC, Johannes Huber

Note You need to log in before you can comment on or make changes to this bug.
Description Stefano Crocco 2010-07-04 11:16:32 UTC
Version:           unspecified (using Devel) 
OS:                Linux

Kross ruby can only be compiled with ruby 1.8. With ruby 1.9 there are several compiling error. These errors fall into two categories:
1. direct access to struct fields. For example, calling RFLOAT(val)->value or RARRAY(value)->len, which worked in ruby 1.8 doesn't work with ruby 1.9. These problems can be solved by replacing direct access with calls to functions like RFLOAT_VALUE and RARRAY_LEN. This works both with ruby 1.9 and 1.8.7. I don't know with ruby 1.8.6.
2. include files and use external variables and functions which don't exist anymore in ruby 1.9 (for example, the ruby_in_eval and ruby_nerrs external variables doesn't seem to exist anymore).

Reproducible: Always
Comment 1 Andrea Scarpino 2010-07-05 15:21:29 UTC
Comment 2 Johannes Huber 2012-09-07 13:38:40 UTC
Confirmed on gentoo too.
Comment 3 Johannes Huber 2013-06-21 11:54:48 UTC
Created attachment 80684 [details]

patch from opensuse to build against ruby 1.9
Comment 4 Johannes Huber 2013-06-21 11:55:49 UTC
Created attachment 80685 [details]

patch by me to allow build against ruby 1.9
Comment 5 Jonathan Riddell 2013-06-21 12:32:34 UTC
Git commit db5091119e4f0db43eea9947826002cef0e52a69 by Jonathan Riddell.
Committed on 21/06/2013 at 12:31.
Pushed by jriddell into branch 'master'.
Fix "kross ruby doesn't compile with ruby 1.9"
Patch from SuSE and Johannes Huber

M  +4    -4    ruby/CMakeLists.txt
M  +3    -5    ruby/rubyconfig.h
M  +4    -4    ruby/rubyextension.cpp
M  +17   -14   ruby/rubyfunction.h
M  +15   -12   ruby/rubyobject.cpp
M  +34   -38   ruby/rubyscript.cpp
M  +1    -1    ruby/rubyvariant.cpp
M  +14   -14   ruby/rubyvariant.h