[MacRuby-devel] Objcetive C methods not "visible" from MacRuby

2009-11-29 Thread Uliano Guerrini
To start playing with mixed Cocoa and MacRuby classes I created a Foo Objcetive 
C Framework containing just one class Roo:

#import 
@interface Roo : NSObject {
float aValue;
NSNumber *anotherValue;
NSMutableString *aString;
}
@property float aValue;
@property(retain) NSNumber *anotherValue;
@property(retain) NSMutableString *aString;
@end

#import "Roo.h"
@implementation Roo
@synthesize aValue;
@synthesize anotherValue;
@synthesize aString;
@end

added garbage collection support and stated the public role of the header file 

then I copied the Foo.framework into ~/Library/Frameworks and

MacBook:~ uliano$ macirb
irb(main):001:0> framework 'Foo'
=> true
irb(main):002:0> a=Roo.new
=> #
irb(main):003:0> a.aValue=12
=> 12
irb(main):004:0> a.anotherValue=150
=> 150
irb(main):005:0> a.anotherValue/a.aValue
=> 12.5
irb(main):006:0> a.aString='Pancetta affumicata!'
=> "Pancetta affumicata!"
irb(main):007:0> a.aString+a.anotherValue.to_s
=> "Pancetta affumicata!150"

wonderful! isn't it?

well not completely: I expected to find aValue, setAValue, anotherValue, ... in 
the list of methods of a but this is not the case

irb(main):008:0> a.methods.sort
=> [:!, :!=, :!~, :==, :===, :=~, :Complex, :Rational, :__callee__, :__id__, 
:__method__, :__native__?, :__send__, :__type__, :clone, 
:define_singleton_method, :dup, :enum_for, :eql?, :equal?, :extend, :freeze, 
:frozen?, :hash, :inspect, :instance_eval, :instance_exec, :instance_of?, 
:instance_variable_defined?, :instance_variable_get, :instance_variable_set, 
:instance_variables, :is_a?, :kind_of?, :load_bridge_support_file, :method, 
:methods, :nil?, :object_id, :private_methods, :protected_methods, 
:public_method, :public_methods, :public_send, :respond_to?, :send, 
:singleton_methods, :taint, :tainted?, :tap, :to_enum, :to_s, :trust, :untaint, 
:untrust, :untrusted?]

so I thought that it was just too magic that everything worked so smoothly 
without doing nothing, maybe to have the correct behavior something should be 
done with the bridgesupport metadata whom I know nothing and I tried

MacBook:~ uliano$ cd /Library/BridgeSupport/
MacBook:BridgeSupport uliano$ gen_bridge_metadata -f Foo -o Foo.bridgesupport  
MacBook:BridgeSupport uliano$ cat Foo.bridgesupport 





MacBook:BridgeSupport uliano$ 

not a clue about any method!

I'm stuck here. How can I have Obcjetive C methods "visibile" from MacRuby?

uliano



___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Objcetive C methods not "visible" from MacRuby

2009-11-29 Thread Vincent Isambart
> I'm stuck here. How can I have Objective C methods "visible" from MacRuby?
In MacRuby there's a hidden additional parameter to methods or instance_methods 
to include Objective-C methods in the lists they return, for instance:

> String.instance_methods(true, true)

The first parameter is already in MRI, true by default. If true will return all 
the methods, if false only the methods declared on the object itself, not its 
ancestors.
The second parameter is specific to MacRuby, false by default. If true it will 
return the methods created in Objective-C, if false it won't.
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] String methods missing in MacRuby

2009-11-29 Thread Robert Rice
Thanks Jordon:

I didn't realize that some core Ruby class methods changed for 1.9. I will 
update my documentation.

Bob Rice

On Nov 28, 2009, at 7:18 PM, Jordan Breeding wrote:

> each is not documented for Ruby 1.9 that I know of, only for Ruby 1.8, do you 
> have the Pragmatic books? They don't like each as valid for String in 1.9.
> 
> If you need to file a bug though (especially for your split problem) try 
> https://www.macruby.org/trac/report
> 
> Jordan
> 
> 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
 [email protected]
 http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>> 
>>> ___
>>> MacRuby-devel mailing list
>>> [email protected]
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>> 
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #466: NSTableView delegate for tool tip gives "unrecognized runtime type "

2009-11-29 Thread MacRuby
#466: NSTableView delegate for tool tip gives "unrecognized runtime type "
+---
 Reporter:  jonat...@…  |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  minor   |   Milestone:  MacRuby 0.5  
Component:  MacRuby |Keywords:   
+---
 Hi, I'm just trying MacRuby 0.5 current beta.

 I have a very simple application that uses a NSTableView with a delegate
 in my ruby class. Mostly this is working just fine. However adding:
  [[BR]]

 def tableView(table, toolTipForCell:cell, rect:rect, tableColumn:column,
 row:row, mouseLocation:mouse)
 [[BR]]NSLog("Table tool tip")
 [[BR]]return "foo"
 end

 gives: unrecognized runtime type `{_NSRect={_NSPoint=ff}{_NSSize=ff}}'

 Best wishes

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] String methods missing in MacRuby

2009-11-29 Thread Conrad Taylor
On Sun, Nov 29, 2009 at 10:14 AM, Robert Rice  wrote:

> Thanks Jordon:
>
> I didn't realize that some core Ruby class methods changed for 1.9. I will
> update my documentation.
>
> Bob Rice
>
>
Bob, this has been well documented many months ago in both "Programming Ruby
1.9" by Dave Thomas et al and "The Programming Ruby Programming Language" by
Yukihiro Matsumoto aka Matz (i.e. the creator of the Ruby programming
language).

-Conrad


> On Nov 28, 2009, at 7:18 PM, Jordan Breeding wrote:
>
> > each is not documented for Ruby 1.9 that I know of, only for Ruby 1.8, do
> you have the Pragmatic books? They don't like each as valid for String in
> 1.9.
> >
> > If you need to file a bug though (especially for your split problem) try
> https://www.macruby.org/trac/report
> >
> > Jordan
> >
> > 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
>  [email protected]
>  http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> >>>
> >>> ___
> >>> MacRuby-devel mailing list
> >>> [email protected]
> >>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> >>
> >> ___
> >> MacRuby-devel mailing list
> >> [email protected]
> >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> >
> > ___
> > MacRuby-devel mailing list
> > [email protected]
> > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] String methods missing in MacRuby

2009-11-29 Thread Conrad Taylor
On Sun, Nov 29, 2009 at 12:37 PM, Conrad Taylor  wrote:

> On Sun, Nov 29, 2009 at 10:14 AM, Robert Rice wrote:
>
>> Thanks Jordon:
>>
>> I didn't realize that some core Ruby class methods changed for 1.9. I will
>> update my documentation.
>>
>> Bob Rice
>>
>>
> Bob, this has been well documented many months ago in both "Programming
> Ruby 1.9" by Dave Thomas et al and "The Ruby Programming Language" by
> Yukihiro Matsumoto aka Matz (i.e. the creator of the Ruby programming
> language).
>

> -Conrad
>
>
>> On Nov 28, 2009, at 7:18 PM, Jordan Breeding wrote:
>>
>> > each is not documented for Ruby 1.9 that I know of, only for Ruby 1.8,
>> do you have the Pragmatic books? They don't like each as valid for String in
>> 1.9.
>> >
>> > If you need to file a bug though (especially for your split problem) try
>> https://www.macruby.org/trac/report
>> >
>> > Jordan
>> >
>> > 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
>>  [email protected]
>>  http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>> >>>
>> >>> ___
>> >>> MacRuby-devel mailing list
>> >>> [email protected]
>> >>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>> >>
>> >> ___
>> >> MacRuby-devel mailing list
>> >> [email protected]
>> >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>> >
>> > ___
>> > MacRuby-devel mailing list
>> > [email protected]
>> > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] String methods missing in MacRuby

2009-11-29 Thread Robert Rice
Hi Conrad:

I don't remember where I downloaded my Ruby.pdf file from - it has no credit 
information.

I suspect you will have lots of other users upgrading directly from Ruby 1.8.7 
to the new MacRuby.

Bob Rice


On Nov 29, 2009, at 3:38 PM, Conrad Taylor wrote:

> 
> 
> On Sun, Nov 29, 2009 at 12:37 PM, Conrad Taylor  wrote:
> On Sun, Nov 29, 2009 at 10:14 AM, Robert Rice  wrote:
> Thanks Jordon:
> 
> I didn't realize that some core Ruby class methods changed for 1.9. I will 
> update my documentation.
> 
> Bob Rice
> 
> 
> Bob, this has been well documented many months ago in both "Programming Ruby 
> 1.9" by Dave Thomas et al and "The Ruby Programming Language" by Yukihiro 
> Matsumoto aka Matz (i.e. the creator of the Ruby programming language).
> 
> -Conrad
>  
> On Nov 28, 2009, at 7:18 PM, Jordan Breeding wrote:
> 
> > each is not documented for Ruby 1.9 that I know of, only for Ruby 1.8, do 
> > you have the Pragmatic books? They don't like each as valid for String in 
> > 1.9.
> >
> > If you need to file a bug though (especially for your split problem) try 
> > https://www.macruby.org/trac/report
> >
> > Jordan
> >
> > 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
>  [email protected]
>  http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> >>>
> >>> ___
> >>> MacRuby-devel mailing list
> >>> [email protected]
> >>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> >>
> >> ___
> >> MacRuby-devel mailing list
> >> [email protected]
> >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> >
> > ___
> > MacRuby-devel mailing list
> > [email protected]
> > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> 
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #424: performance regression from ruby 1.8 and 1.9

2009-11-29 Thread MacRuby
#424: performance regression from ruby 1.8 and 1.9
-+--
 Reporter:  jordan.breed...@…|   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:   
Component:  MacRuby  |Keywords:   
-+--

Comment(by jordan.breed...@…):

 So, I wrote a self contained group of tests to test the performance of two
 variants of swapping characters in strings, and test the performance of
 push/pop and pushObjects/pop in combination with inserting into a Set.

 The attachment is [attachment:performance_test.rb performance_test.rb]

 Results:

 Ruby 1.8
 {{{

 Test 001 -- String character swap, 250 times
 Test 001: 13.5609 seconds
 Overall: 19.4610 seconds


 Test 002 -- String character swap (alternate), 250 times
 Test 002: 8.5599 seconds
 Overall: 14.6769 seconds


 Test 003 and 004 -- Insert 50 nodes into a priority queue using
 pop/push (003), plus Set calls (004)
 Test 003: 71.3116 seconds
 Test 004: 1.1641 seconds
 Overall: 73.5490 seconds


 Test 005 and 006 -- Insert 50 nodes into a priority queue using
 pop/pushObjects (005), plus Set calls (006)
 Test 005: 77.3168 seconds
 Test 006: 1.0839 seconds
 Overall: 74.4669 seconds

 }}}

 Ruby 1.9
 {{{

 Test 001 -- String character swap, 250 times
 Test 001: 9.7238 seconds
 Overall: 14.9907 seconds


 Test 002 -- String character swap (alternate), 250 times
 Test 002: 8.4750 seconds
 Overall: 13.9169 seconds


 Test 003 and 004 -- Insert 50 nodes into a priority queue using
 pop/push (003), plus Set calls (004)
 Test 003: 23.5861 seconds
 Test 004: 1.2312 seconds
 Overall: 27.4714 seconds


 Test 005 and 006 -- Insert 50 nodes into a priority queue using
 pop/pushObjects (005), plus Set calls (006)
 Test 005: 22.4412 seconds
 Test 006: 1.1627 seconds
 Overall: 23.1751 seconds

 }}}

 MacRuby
 {{{

 Test 001 -- String character swap, 250 times
 Test 001: 27.9602 seconds
 Overall: 36.8786 seconds


 Test 002 -- String character swap (alternate), 250 times
 Test 002: 24.1841 seconds
 Overall: 32.5536 seconds


 Test 003 and 004 -- Insert 50 nodes into a priority queue using
 pop/push (003), plus Set calls (004)
 Test 003: 22.8907 seconds
 Test 004: 2.4607 seconds
 Overall: 28.7985 seconds


 Test 005 and 006 -- Insert 50 nodes into a priority queue using
 pop/pushObjects (005), plus Set calls (006)
 Test 005: 28.8811 seconds
 Test 006: 2.5541 seconds
 Overall: 27.3512 seconds

 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #424: performance regression from ruby 1.8 and 1.9

2009-11-29 Thread MacRuby
#424: performance regression from ruby 1.8 and 1.9
-+--
 Reporter:  jordan.breed...@…|   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:   
Component:  MacRuby  |Keywords:   
-+--

Comment(by vincent.isamb...@…):

 MacRuby's strings will be rewritten at least partially to fix lots of
 problems with the current implementation so it's no use benchmarking them
 yet.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #424: performance regression from ruby 1.8 and 1.9

2009-11-29 Thread MacRuby
#424: performance regression from ruby 1.8 and 1.9
-+--
 Reporter:  jordan.breed...@…|   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:   
Component:  MacRuby  |Keywords:   
-+--

Comment(by jordan.breed...@…):

 Okay, I will keep it around just in case so I can test again after the
 changes. String appears to be the biggest loss of performance for me right
 now, so even though push/pushObjects/pop seem like they could be slightly
 faster (compared to 1.9) they aren't as far behind to begin with (I am
 assuming it is really Array which is slightly slower).

 I will test again after general performance work has been done and String
 is reworked. Do you know if the String reworking is targeted for 0.5, or
 later?

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #424: performance regression from ruby 1.8 and 1.9

2009-11-29 Thread MacRuby
#424: performance regression from ruby 1.8 and 1.9
-+--
 Reporter:  jordan.breed...@…|   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:   
Component:  MacRuby  |Keywords:   
-+--

Comment(by lsansone...@…):

 The new String is for later (0.6).

 I didn't shark your swap benchmark but it creates many temporary objects
 (one String#dup, 2 String#[]) and our object allocator is currently slow,
 which could explain why it's slower than 1.9.

 This should definitely be faster once our Strings are no longer pure CF
 objects, and can benefit of the thread local GC optimization.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #466: NSTableView delegate for tool tip gives "unrecognized runtime type "

2009-11-29 Thread MacRuby
#466: NSTableView delegate for tool tip gives "unrecognized runtime type "
+---
 Reporter:  jonat...@…  |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  minor   |   Milestone:  MacRuby 0.5  
Component:  MacRuby |Keywords:   
+---

Comment(by lsansone...@…):

 Are you running the app in 32-bit or 64-bit?

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #467: macrubyc generate binary that does not work using File.dirname

2009-11-29 Thread MacRuby
#467: macrubyc generate binary that does not work using File.dirname
-+--
 Reporter:  jordan.breed...@…|   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:   
Component:  MacRuby  |Keywords:   
-+--
 During the investigation for #424 I decide to try compiling my main script
 using macrubyc, unfortunately it didn't work at all.

 I narrowed the initial failure to compiler (since I don't know if there
 will be other problems later) to:

 {{{
 #!/usr/bin/env macruby

 $:.unshift(File.dirname($0))
 }}}

 It results in this error:

 {{{
 154 jor...@thetourist ~/Tests/priority_queue_bug > ./test
 core:in `dirname:': can't convert false into String (TypeError)
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #468: String.split("") doesn't work as expected

2009-11-29 Thread MacRuby
#468: String.split("") doesn't work as expected
-+--
 Reporter:  jordan.breed...@…|   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:   
Component:  MacRuby  |Keywords:   
-+--
 As reported on the list String.split("") doesn't work as expected:

 {{{
 156 jor...@thetourist ~/Tests/priority_queue_bug > ruby -e 'p
 "test".split("")'
 ["t", "e", "s", "t"]
 157 jor...@thetourist ~/Tests/priority_queue_bug > /opt/homebrew/bin/ruby
 -e 'p "test".split("")'
 ["t", "e", "s", "t"]
 158 jor...@thetourist ~/Tests/priority_queue_bug > macruby -e 'p
 "test".split("")'
 ["test"]
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #442: each_with_index fails for nested arrays

2009-11-29 Thread MacRuby
#442: each_with_index fails for nested arrays
--+-
 Reporter:  devin.chalm...@…  |Owner:  lsansone...@…
 Type:  defect|   Status:  closed   
 Priority:  major |Milestone:  MacRuby 0.5  
Component:  MacRuby   |   Resolution:  fixed
 Keywords:|  
--+-
Changes (by lsansone...@…):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 I can't reproduce the bug as of r3060, so I assume it has been fixed.

 {{{
 $ cat t.rb
 arrays = Array.new(3){|i| Array.new(3){|j| '%d-%d' % [i, j]}}
 arrays.each_with_index do |arr, i|
   arr.each_with_index do |elem, j|
 puts elem == '%d-%d' % [i, j]
   end
 end
 $ macruby t.rb
 true
 true
 true
 true
 true
 true
 true
 true
 true
 $ ruby19 t.rb
 true
 true
 true
 true
 true
 true
 true
 true
 true
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #437: -[NSObject hash] values change when MacRuby is initialized

2009-11-29 Thread MacRuby
#437: -[NSObject hash] values change when MacRuby is initialized
-+--
 Reporter:  illenber...@…|Owner:  lsansone...@…
 Type:  defect   |   Status:  closed   
 Priority:  major|Milestone:  MacRuby 0.5  
Component:  MacRuby  |   Resolution:  fixed
 Keywords:  NSObject hash|  
-+--
Changes (by lsansone...@…):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Should be fixed in r3061.

 {{{
 $ gcc /tmp/t.m -o /tmp/t -framework MacRuby -framework Foundation -fobjc-
 gc
 $ /tmp/t
 $
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel