Bug 243565

Summary: kross ruby doesn't compile with ruby 1.9
Product: [Developer tools] bindings Reporter: Stefano Crocco <stefano.crocco>
Component: generalAssignee: kde-bindings
Status: RESOLVED FIXED    
Severity: normal CC: avilla, dilfridge, johu, kensington, pete, robert, scarpino, swills, tittiatcoke
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: ruby19.patch
ruby19-cmake.patch

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
confirmed
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]
ruby19.patch

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

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

http://commits.kde.org/kross-interpreters/db5091119e4f0db43eea9947826002cef0e52a69