[fxruby-users] Support for Ruby 1.9?
gga
ggarra at advancedsl.com.ar
Wed Apr 18 08:37:42 EDT 2007
Kevin Burge wrote:
>
> The main things that have affected me are:
>
What crazy version of 1.9 are you testing? Half of the stuff you
mentioned works fine for me. Latest SVN.
Examples:
> irb1.9
>> puts RUBY_VERSION
1.9.0
----
> in Ruby code:
> String is not Enumerable (i.e. no each)
Huh?
>> 'asdsd'.each { |x| puts x }
asdsd
=> "asdsd"
>> 'asdsd'.each_byte { |x| puts x }
97
115
100
115
100
No Unicode, yet, thou.
> arity changes for blocks
Like?
> send vs. funcall
>> '5'.send(:to_i)
=> 5
(or do you mean how this resolved in inheritance - a subtle change --
see comp.lang.ruby. Basically send was broken since it could call
private methods before)
> Thread.critical not supported
True.
> using "case/when" with a colon, instead of "then" or ";", i.e. "when 7:
> true"
Huh? Colons? You must have gotten python on your mind.
>> a = 20
=> 20
>> case a
>> when 20
>> puts 'x'
>> else
>> puts 'y'
>> end
=> 'x'
>
> in Extension code:
> rb_cvar_set takes 1 less arg
Yes, that's what it should have been all along. Some crazy guy put a
4th warning argument somewhere in the 1.8 branch and matz removed it.
> RB_STRING doesn't allow direct access anymore (I've been converting to
> RB_STRING_LEN and RB_STRING_PTR (not sure if this is the right thing yet).
AFAIK, they are RSTRING_LEN and RSTRING_PTR. For array you have
RARRAY_LEN and RARRAY_PTR. The PTR version of string is hardly ever
used due to StringValuePtr() and StringValueCStr() -- pickaxe recommended.
>
> Also, YARV only supports native threads at this point, as far as I can tell.
>
Yep. The code for ruby's 1.8 green threads is there but koichi turned
it off at some point (some bug, probably).
--
Gonzalo Garramuño
ggarra at advancedsl.com.ar
AMD4400 - ASUS48N-E
GeForce7300GT
Kubuntu Edgy
More information about the fxruby-users
mailing list