[MacRuby-devel] String methods missing in MacRuby
Jordan Breeding
jordan.breeding at me.com
Sat Nov 28 16:20:57 PST 2009
Also, just so you know this really is a 1.8 vs 1.9 problem and not an MRI vs. MacRuby problem:
76 jordan at thetourist ~ > ruby test.rb
"hello, world!"
77 jordan at thetourist ~ > /opt/homebrew/bin/ruby test.rb
test.rb:3:in `<main>': undefined method `each' for "hello, world!":String (NoMethodError)
78 jordan at thetourist ~ > macruby test.rb
test.rb:3:in `<main>': undefined method `each' for "hello, world!":NSMutableString (NoMethodError)
test.rb:
#!/usr/bin/eval ruby
"hello, world!".each { |item| p item }
my homebrew is 1.9
On Nov 28, 2009, at 18:09, Robert Rice wrote:
> Hi Jordon:
>
> each is a documented method for the the string class so it should be provided. It is useful.
>
> How would I go about filing a bug report?
>
> Bob Rice
>
>
> On Nov 28, 2009, at 3:35 PM, Jordan Breeding wrote:
>
>> I think that String.each was mixed in from Enumerable, which 1.9 no longer does.
>>
>> each is not a method on String in 1.9 either, so I don't think this is a MacRuby problem.
>>
>> You should file a bug for the problem with split().
>>
>> On Nov 28, 2009, at 14:30, Robert Rice wrote:
>>
>>> Hi Group:
>>>
>>> The string.each method is undefined in MacRuby.
>>> I can work around it by using string.each_byte then convert the fixnum back to a character using the i.chr method.
>>>
>>> Also string.split( "" ) does not convert the string to an array as it did before.
>>>
>>> Bob Rice
>>> _______________________________________________
>>> MacRuby-devel mailing list
>>> MacRuby-devel at lists.macosforge.org
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3820 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20091128/846e5841/attachment.bin>
More information about the MacRuby-devel
mailing list