[MacRuby-devel] Stream of Consciousness Testing Log
Laurent Sansonetti
lsansonetti at apple.com
Mon Mar 31 17:22:26 PDT 2008
On Mar 31, 2008, at 4:56 PM, Pierce T. Wetter III wrote:
>
> On Mar 31, 2008, at 3:16 PM, Laurent Sansonetti wrote:
>> Hi Pierce,
>>
>> A different person reported me the same problem a few minutes ago,
>> and it turns out that the problem is not reproducible in trunk. I
>> now remember that I fixed a few days ago a GC-related bug in the
>> magic constants, which hasn't been backported into the testing
>> branch yet. Could you by any chance try to reproduce your problem
>> on trunk? That would be very useful.
>
>
> Wow, I'm so cool Laurent told me to use Trunk instead of that skanky
> old testing branch!
>
> I rule!
Well it seems that trunk it now stable (but not for very long) :-)
> Ok, testing...
>
>
> svn co http://svn.macosforge.org/repository/ruby/MacRuby/trunk
> MacRubyTrunk
>
> ... lots of downloading to do...
>
> Checked out revision 124.
>
> $ cd MacRubyTrunk
> $ autoconf
> $ ./configure --enable-framework --enable-fat-binary --program-
> prefix=mac
> $ make
> $ sudo make install <--- Bwa Ha Ha, you said rdoc was fixed in
> trunk!
>
> Hey, looks like its fixed. I'm getting a different error now:
>
> /Users/pierce/svnProjects/build/Debug/Frictionless.app/Contents/
> Resources/Action.rb:8:in `<class:Action>': undefined method
> `blendedColorWithFraction_ofColor' for #<NSCachedRGBColor:0x17e6890>
> (NoMethodError)
> from /Users/pierce/svnProjects/build/Debug/Frictionless.app/
> Contents/Resources/Action.rb:4:in `<top (required)>'
> from /Users/pierce/svnProjects/build/Debug/Frictionless.app/
> Contents/Resources/rb_main-mr.rb:28:in `require'
> from /Users/pierce/svnProjects/build/Debug/Frictionless.app/
> Contents/Resources/rb_main-mr.rb:28:in `block in <main>'
> from /Users/pierce/svnProjects/build/Debug/Frictionless.app/
> Contents/Resources/rb_main-mr.rb:26:in `each'
> from /Users/pierce/svnProjects/build/Debug/Frictionless.app/
> Contents/Resources/rb_main-mr.rb:26:in `<main>'
>
>
> Generated by this line:
>
>
> @@dueColor
> =
> NSColor
> .redColor.blendedColorWithFraction_ofColor(0.5,NSColor.blackColor)
>
> Hmmm... Is that because I'm using rubyCocoa style calls?
>
> Trying:
>
> @@dueColor=NSColor.redColor.blendedColorWithFraction(0.5,
> ofColor:NSColor.blackColor)
>
> Ok, that worked. Oh, so I have to change all my old calls?
>
> Hmmm... That's going to be exhausting. I'll have to think about that
> one, since it means a total code migration, 5700 lines to edit.
Yes, you will have to change all your calls.
This won't definitely be a trivial operation, that's why I would like
to work on a RubyCocoa-compatible layer, so that the RubyCocoa
semantics would be temporarily preserved, and developers can therefore
migrate to the new semantics.
> Question, the docs imply that:
>
> person.setFirstName(first, lastName:last)
>
> Can't be written as:
>
> person.setFirstName(first, lastName: last)
>
> Is that true?
It is.
$ macirb
irb(main):001:0> class Person
irb(main):002:1> def setFirstName(first, lastName:last)
irb(main):003:2> @first, @last = first, last
irb(main):004:2> end
irb(main):005:1> end
=> nil
irb(main):006:0> p = Person.new
=> #<Person:0x1669890>
irb(main):007:0> p.setFirstName('foo', lastName:'bar')
=> ["foo", "bar"]
irb(main):008:0> p.setFirstName('foo', lastName: 'bar')
=> ["foo", "bar"]
irb(main):009:0> p.setFirstName 'foo', lastName: 'bar'
=> ["foo", "bar"]
irb(main):011:0> p.setFirstName 'foo', :lastName => 'bar'
=> ["foo", "bar"]
So, glad to know that the original problem seems to really be fixed in
trunk. I am going to fix more bugs in trunk, then migrate the changes
to the testing branch. The new Array class is now pretty functional.
Laurent
More information about the MacRuby-devel
mailing list