[MacRuby-devel] [MacRuby] #366: Hotcocoa 'demo' crashes

2009-10-07 Thread MacRuby
#366: Hotcocoa 'demo' crashes
+---
 Reporter:  dave.bald...@…  |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  blocker |   Milestone:   
Component:  MacRuby |Keywords:   
+---
 Using the nightly build from 6th October on Snow Leopard, Macbook pro (64
 bit).

 macrake in the hotcocoa demo directory brings up a window and then quits
 unexpectedly.

-- 
Ticket URL: 
MacRuby 

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


[MacRuby-devel] another macruby tips post: playing audio files

2009-10-07 Thread Matt Aimonetti
I published another post in my macruby tips series:
http://merbist.com/2009/10/06/macruby-tips-how-to-play-an-audio-file/
Let me know if you have any questions, and since I'm at it, I'd like to
thank Laurent for his time reviewing the post.

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


[MacRuby-devel] MacRuby not finding a method that Ruby is

2009-10-07 Thread Edward Hynes

Hi,

I'm attempting to use the RParsec gem under MacRuby, but am getting a  
NoMethodError when it loads.  I've create a test file that simply adds  
my local gem directory to the front of the library search path and  
then calls "require 'rparsec'".  This file runs fine under Ruby 1.9,  
but produces the following error when called from MacRuby 0.4.


/Users/ehynes/Test/Gems/rparsec/parser.rb:32:in `block in init':  
super: no superclass method `initialize:' for  
RParsec::ValueParser:RParsec::ValueParser (NoMethodError)

from /Users/ehynes/Test/Gems/rparsec/parsers.rb:621:in `new'
	from /Users/ehynes/Test/Gems/rparsec/parsers.rb:621:in  
`'

from /Users/ehynes/Test/Gems/rparsec/parsers.rb:3:in `'
from /Users/ehynes/Test/Gems/rparsec.rb:3:in `require'
	from /Users/ehynes/Test/Gems/rparsec.rb:3:in `block in (required)>'

from /Users/ehynes/Test/Gems/rparsec.rb:2:in `each'
from /Users/ehynes/Test/Gems/rparsec.rb:2:in `'
from AbcParser.rb:2:in `require'
from AbcParser.rb:2:in `'


The method with the error in the Parser class is:

  def self.init(*vars)
parser_checker = {}
vars.each_with_index do |var, i|
  name = var.to_s
  parser_checker[i] = var if name.include?('parser') && ! 
name.include?('parsers')

end
define_method(:initialize) do |*params|
--->  super()   # <--- line 32
  vars.each_with_index do |var, i|
param = params[i]
if parser_checker.include? i
  TypeChecker.check_arg_type Parser, param, self, i
end
instance_variable_set("@"+var.to_s, param)
  end
end
  end


Any ideas as to why Ruby can call super in the above method, but  
MacRuby can't?  Is there a fix or workaround that I could use?  An  
alternate parser?


Thanks,
Ed


P.S.  I did have to change one line in the RParsec parser.rb file to  
get it to run under Ruby 1.9, replacing a ':' with a 'then' in a case  
statement.


$ diff parser_original.rb parser.rb
881c881
< case c when String: c[0] else c end
---
	> case c when String then c[0] else c end  # ':' replaced with  
'then'




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


Re: [MacRuby-devel] MacRuby not finding a method that Ruby is

2009-10-07 Thread Matt Aimonetti
you might want to try your luck with 0.5

- Matt

On Wed, Oct 7, 2009 at 7:37 PM, Edward Hynes  wrote:

> Hi,
>
> I'm attempting to use the RParsec gem under MacRuby, but am getting a
> NoMethodError when it loads.  I've create a test file that simply adds my
> local gem directory to the front of the library search path and then calls
> "require 'rparsec'".  This file runs fine under Ruby 1.9, but produces the
> following error when called from MacRuby 0.4.
>
> /Users/ehynes/Test/Gems/rparsec/parser.rb:32:in `block in init': super: no
> superclass method `initialize:' for
> RParsec::ValueParser:RParsec::ValueParser (NoMethodError)
>from /Users/ehynes/Test/Gems/rparsec/parsers.rb:621:in `new'
>from /Users/ehynes/Test/Gems/rparsec/parsers.rb:621:in
> `'
>from /Users/ehynes/Test/Gems/rparsec/parsers.rb:3:in ` (required)>'
>from /Users/ehynes/Test/Gems/rparsec.rb:3:in `require'
>from /Users/ehynes/Test/Gems/rparsec.rb:3:in `block in  (required)>'
>from /Users/ehynes/Test/Gems/rparsec.rb:2:in `each'
>from /Users/ehynes/Test/Gems/rparsec.rb:2:in `'
>from AbcParser.rb:2:in `require'
>from AbcParser.rb:2:in `'
>
>
> The method with the error in the Parser class is:
>
>  def self.init(*vars)
>parser_checker = {}
>vars.each_with_index do |var, i|
>  name = var.to_s
>  parser_checker[i] = var if name.include?('parser') &&
> !name.include?('parsers')
>end
>define_method(:initialize) do |*params|
> --->  super()   # <--- line 32
>  vars.each_with_index do |var, i|
>param = params[i]
>if parser_checker.include? i
>  TypeChecker.check_arg_type Parser, param, self, i
>end
>instance_variable_set("@"+var.to_s, param)
>  end
>end
>  end
>
>
> Any ideas as to why Ruby can call super in the above method, but MacRuby
> can't?  Is there a fix or workaround that I could use?  An alternate parser?
>
> Thanks,
> Ed
>
>
> P.S.  I did have to change one line in the RParsec parser.rb file to get it
> to run under Ruby 1.9, replacing a ':' with a 'then' in a case statement.
>
>$ diff parser_original.rb parser.rb
>881c881
>< case c when String: c[0] else c end
>---
>> case c when String then c[0] else c end  # ':' replaced with
> 'then'
>
>
>
> ___
> 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 0.5 beta 1

2009-10-07 Thread Laurent Sansonetti

Hi,

The first beta release of MacRuby 0.5 is out! I prepared some notes  
here:


http://www.macruby.org/blog/2009/10/07/macruby05b1.html

The goal is to go through a few beta releases before releasing the  
final 0.5.


Please give it a try and report us bugs & feedback :)

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


Re: [MacRuby-devel] MacRuby not finding a method that Ruby is

2009-10-07 Thread Edward Hynes

I'm still on a 32-bit machine, so can't try 0.5 yet :^(

I did manage to find a workaround, however, by creating an alias for  
the 'initialize' method and then calling it instead of 'super' inside  
of the 'define_method' call.


Ed

On Oct 7, 2009, at 10:51 PM, Matt Aimonetti wrote:


you might want to try your luck with 0.5

- Matt

On Wed, Oct 7, 2009 at 7:37 PM, Edward Hynes   
wrote:

Hi,

I'm attempting to use the RParsec gem under MacRuby, but am getting  
a NoMethodError when it loads.  I've create a test file that simply  
adds my local gem directory to the front of the library search path  
and then calls "require 'rparsec'".  This file runs fine under Ruby  
1.9, but produces the following error when called from MacRuby 0.4.


/Users/ehynes/Test/Gems/rparsec/parser.rb:32:in `block in init':  
super: no superclass method `initialize:' for  
RParsec::ValueParser:RParsec::ValueParser (NoMethodError)

   from /Users/ehynes/Test/Gems/rparsec/parsers.rb:621:in `new'
   from /Users/ehynes/Test/Gems/rparsec/parsers.rb:621:in  
`'
   from /Users/ehynes/Test/Gems/rparsec/parsers.rb:3:in `(required)>'

   from /Users/ehynes/Test/Gems/rparsec.rb:3:in `require'
   from /Users/ehynes/Test/Gems/rparsec.rb:3:in `block in (required)>'

   from /Users/ehynes/Test/Gems/rparsec.rb:2:in `each'
   from /Users/ehynes/Test/Gems/rparsec.rb:2:in `'
   from AbcParser.rb:2:in `require'
   from AbcParser.rb:2:in `'


The method with the error in the Parser class is:

 def self.init(*vars)
   parser_checker = {}
   vars.each_with_index do |var, i|
 name = var.to_s
 parser_checker[i] = var if name.include?('parser') && ! 
name.include?('parsers')

   end
   define_method(:initialize) do |*params|
--->  super()   # <--- line 32
 vars.each_with_index do |var, i|
   param = params[i]
   if parser_checker.include? i
 TypeChecker.check_arg_type Parser, param, self, i
   end
   instance_variable_set("@"+var.to_s, param)
 end
   end
 end


Any ideas as to why Ruby can call super in the above method, but  
MacRuby can't?  Is there a fix or workaround that I could use?  An  
alternate parser?


Thanks,
Ed


P.S.  I did have to change one line in the RParsec parser.rb file to  
get it to run under Ruby 1.9, replacing a ':' with a 'then' in a  
case statement.


   $ diff parser_original.rb parser.rb
   881c881
   < case c when String: c[0] else c end
   ---
   > case c when String then c[0] else c end  # ':' replaced  
with 'then'




___
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


--
Edward Hynes
Dharma Gaia LLC
"Software with the Earth in Mind"
http://dharmagaia.com



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


Re: [MacRuby-devel] MacRuby not finding a method that Ruby is

2009-10-07 Thread Laurent Sansonetti
We fixed a few 32-bit issues in trunk so you may want to give it a try  
one more time.


At least we are not maintaining 0.4 anymore, so it would be great if  
you could try your code with trunk and let us know if the bug is still  
there. Then we can try to reduce it and fix it :)


Laurent

On Oct 7, 2009, at 9:16 PM, Edward Hynes wrote:


I'm still on a 32-bit machine, so can't try 0.5 yet :^(

I did manage to find a workaround, however, by creating an alias for  
the 'initialize' method and then calling it instead of 'super'  
inside of the 'define_method' call.


Ed

On Oct 7, 2009, at 10:51 PM, Matt Aimonetti wrote:


you might want to try your luck with 0.5

- Matt

On Wed, Oct 7, 2009 at 7:37 PM, Edward Hynes   
wrote:

Hi,

I'm attempting to use the RParsec gem under MacRuby, but am getting  
a NoMethodError when it loads.  I've create a test file that simply  
adds my local gem directory to the front of the library search path  
and then calls "require 'rparsec'".  This file runs fine under Ruby  
1.9, but produces the following error when called from MacRuby 0.4.


/Users/ehynes/Test/Gems/rparsec/parser.rb:32:in `block in init':  
super: no superclass method `initialize:' for  
RParsec::ValueParser:RParsec::ValueParser (NoMethodError)

   from /Users/ehynes/Test/Gems/rparsec/parsers.rb:621:in `new'
   from /Users/ehynes/Test/Gems/rparsec/parsers.rb:621:in  
`'
   from /Users/ehynes/Test/Gems/rparsec/parsers.rb:3:in `(required)>'

   from /Users/ehynes/Test/Gems/rparsec.rb:3:in `require'
   from /Users/ehynes/Test/Gems/rparsec.rb:3:in `block in (required)>'

   from /Users/ehynes/Test/Gems/rparsec.rb:2:in `each'
   from /Users/ehynes/Test/Gems/rparsec.rb:2:in `>'

   from AbcParser.rb:2:in `require'
   from AbcParser.rb:2:in `'


The method with the error in the Parser class is:

 def self.init(*vars)
   parser_checker = {}
   vars.each_with_index do |var, i|
 name = var.to_s
 parser_checker[i] = var if name.include?('parser') && ! 
name.include?('parsers')

   end
   define_method(:initialize) do |*params|
--->  super()   # <--- line 32
 vars.each_with_index do |var, i|
   param = params[i]
   if parser_checker.include? i
 TypeChecker.check_arg_type Parser, param, self, i
   end
   instance_variable_set("@"+var.to_s, param)
 end
   end
 end


Any ideas as to why Ruby can call super in the above method, but  
MacRuby can't?  Is there a fix or workaround that I could use?  An  
alternate parser?


Thanks,
Ed


P.S.  I did have to change one line in the RParsec parser.rb file  
to get it to run under Ruby 1.9, replacing a ':' with a 'then' in a  
case statement.


   $ diff parser_original.rb parser.rb
   881c881
   < case c when String: c[0] else c end
   ---
   > case c when String then c[0] else c end  # ':'  
replaced with 'then'




___
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


--
Edward Hynes
Dharma Gaia LLC
"Software with the Earth in Mind"
http://dharmagaia.com



___
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] Trunk build not working

2009-10-07 Thread Giampiero De Ciantis

I am getting this when I build:

(in /Users/Gp/projects/macruby)
/usr/bin/gcc -std=c99 markgc.c -o markgc -Wno-format
In file included from markgc.c:31:
/usr/local/include/mach-o/arch.h:35: error: nested redefinition of  
‘enum NXByteOrder’
/usr/local/include/mach-o/arch.h:35: error: redeclaration of ‘enum  
NXByteOrder’
/usr/local/include/mach-o/arch.h:36: error: redeclaration of  
enumerator ‘NX_UnknownByteOrder’
/usr/include/architecture/byte_order.h:147: error: previous definition  
of ‘NX_UnknownByteOrder’ was here
/usr/local/include/mach-o/arch.h:37: error: redeclaration of  
enumerator ‘NX_LittleEndian’
/usr/include/architecture/byte_order.h:148: error: previous definition  
of ‘NX_LittleEndian’ was here
/usr/local/include/mach-o/arch.h:39: error: redeclaration of  
enumerator ‘NX_BigEndian’
/usr/include/architecture/byte_order.h:150: error: previous definition  
of ‘NX_BigEndian’ was here

rake aborted!
Command failed with status (1): [/usr/bin/gcc -std=c99 markgc.c -o  
markgc -...]


I am using SL on a Core 2 Duo iMac. Any thoughts?

Cheers,

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


Re: [MacRuby-devel] MacRuby 0.5 beta 1

2009-10-07 Thread Laurent Sansonetti

On Oct 7, 2009, at 9:13 PM, Laurent Sansonetti wrote:


Hi,

The first beta release of MacRuby 0.5 is out! I prepared some notes  
here:


http://www.macruby.org/blog/2009/10/07/macruby05b1.html

The goal is to go through a few beta releases before releasing the  
final 0.5.


Please give it a try and report us bugs & feedback :)



I forgot an important detail:

I would also like to thank all the people who contributed efforts into  
this release. It took us several months to get there and I am really  
glad of what we achieved in such a relatively short period of time.


Now, let's continue the good work until the next beta :)

http://svn.macosforge.org/repository/ruby/MacRuby/trunk/TODO

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


Re: [MacRuby-devel] Trunk build not working

2009-10-07 Thread Laurent Sansonetti
It doesn't build because you apparently installed an incompatible set  
of mach-o include files in /usr/local. You could temporarily rename  
the /usr/local/include/mach-o directory (or delete it, if you don't  
know why it's there).


Laurent

On Oct 7, 2009, at 9:30 PM, Giampiero De Ciantis wrote:


I am getting this when I build:

(in /Users/Gp/projects/macruby)
/usr/bin/gcc -std=c99 markgc.c -o markgc -Wno-format
In file included from markgc.c:31:
/usr/local/include/mach-o/arch.h:35: error: nested redefinition of  
‘enum NXByteOrder’
/usr/local/include/mach-o/arch.h:35: error: redeclaration of ‘enum  
NXByteOrder’
/usr/local/include/mach-o/arch.h:36: error: redeclaration of  
enumerator ‘NX_UnknownByteOrder’
/usr/include/architecture/byte_order.h:147: error: previous  
definition of ‘NX_UnknownByteOrder’ was here
/usr/local/include/mach-o/arch.h:37: error: redeclaration of  
enumerator ‘NX_LittleEndian’
/usr/include/architecture/byte_order.h:148: error: previous  
definition of ‘NX_LittleEndian’ was here
/usr/local/include/mach-o/arch.h:39: error: redeclaration of  
enumerator ‘NX_BigEndian’
/usr/include/architecture/byte_order.h:150: error: previous  
definition of ‘NX_BigEndian’ was here

rake aborted!
Command failed with status (1): [/usr/bin/gcc -std=c99 markgc.c -o  
markgc -...]


I am using SL on a Core 2 Duo iMac. Any thoughts?

Cheers,

-Gp
___
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] Problems with return code from sheet (possible regression)

2009-10-07 Thread Michael Winterstein
It seems to be working in 2761, thanks.  For a little while none of  
those calls were getting through (apparently being sent to  
drb.method_missing) so I couldn't check if it was working.  'RunModal'  
is a workaround for that specific call, too.  I'm also looking into  
SL's new way of using sheets, with a completion handler.


Michael
On Oct 6, 2009, at 4:57 PM, Laurent Sansonetti wrote:


FYI, the problem should (in theory) be fixed in r2741.

Laurent

On Oct 6, 2009, at 1:28 PM, Laurent Sansonetti wrote:


Hi Michael,

It's actually a well-known bug. MacRuby trunk doesn't honor the  
sel_of_type BridgeSupport attribute, therefore your sheet callback  
is registered to the runtime with the default signature (where all  
arguments and return value are Objective-C objects), and later it  
fails to convert the returnCode argument (in this backtrace, 0x1)  
as an Objective-C object.


Laurent

On Oct 6, 2009, at 12:58 PM, Michael Winterstein wrote:

I seem to have run into nearly the same problem that I had a while  
back, in this ticket:

http://www.macruby.org/trac/ticket/221

I haven't filed it yet this time since last time it turned out to  
be already fixed, but I'm not certain that's the case now.  At any  
rate, it's being handled by different functions.
The same thing is happening - the return code being passed to my  
delegate (from [NSApplication endSheet:returnCode]) isn't being  
treated as the NSInteger it ought to be.  At least I think so.   
Here's the trace, and you can see that the value 1(NSOKButton) is  
being treated as id, causing problems (0/NSCancelButton doesn't  
crash as it's a special case) :


Program received signal:  “EXC_BAD_ACCESS”.
(gdb) bt
#0  rb_ocid_to_rval [inlined] () at /Users/parzival/devo/buried/ 
MacRuby/trunk/include/ruby/ruby.h:1252
#1  0x000100130161 in rb_vm_ocval_to_rval (ocval=0x1) at  
compiler.cpp:6155

#2  0x00010110537c in ?? ()
#3  0x7fff820c29f9 in -[NSApplication endSheet:returnCode:] ()
#4  0x7fff81fd523e in -[NSApplication sendAction:to:from:] ()
#5  0x7fff81fd519d in -[NSControl sendAction:to:] ()
#6  0x7fff8206068b in -[NSCell  
trackMouse:inRect:ofView:untilMouseUp:] ()
#7  0x7fff820911a3 in -[NSButtonCell  
trackMouse:inRect:ofView:untilMouseUp:] ()

#8  0x7fff8205f135 in -[NSControl mouseDown:] ()
#9  0x7fff81f79967 in -[NSWindow sendEvent:] ()
#10 0x7fff81eaf122 in -[NSApplication sendEvent:] ()
#11 0x7fff81e45acc in -[NSApplication run] ()
#12 0x7fff81e3e798 in NSApplicationMain ()

Attached are a few files as a test case, an NSWindowController  
subclass and MainMenu.nib that can be dropped into a  new project  
to check this if anyone wants to.  I recall when I first had this  
problem that I could see what the change was, but unfortunately  
I've forgotten that now.





___
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 0.5 beta 1

2009-10-07 Thread Matt Aimonetti
Congrats Laurent, you did an awesome job on this release, I can't wait to
0.5 final out :)

To celebrate the release I wrote a quick blog post
http://merbist.com/2009/10/07/macruby-0-5-beta-1-and-textorize/
And pushed what might be the very first MacRuby specific gem (at least on
gemcutter :))

I basically simply ported Thomas Fuchs textorize gem to MacRuby, released it
on gemcutter and wrote a quick explanation on my blog.

It's good to finally have rubygems back in 0.5 :)

- Matt



On Wed, Oct 7, 2009 at 9:31 PM, Laurent Sansonetti wrote:

> On Oct 7, 2009, at 9:13 PM, Laurent Sansonetti wrote:
>
>  Hi,
>>
>> The first beta release of MacRuby 0.5 is out! I prepared some notes here:
>>
>> http://www.macruby.org/blog/2009/10/07/macruby05b1.html
>>
>> The goal is to go through a few beta releases before releasing the final
>> 0.5.
>>
>> Please give it a try and report us bugs & feedback :)
>>
>
>
> I forgot an important detail:
>
> I would also like to thank all the people who contributed efforts into this
> release. It took us several months to get there and I am really glad of what
> we achieved in such a relatively short period of time.
>
> Now, let's continue the good work until the next beta :)
>
> http://svn.macosforge.org/repository/ruby/MacRuby/trunk/TODO
>
>
> Laurent
> ___
> 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 0.5 beta 1

2009-10-07 Thread Conrad Taylor
Hi Laurent, in the compatibility section, you might want to change

We want MacRuby to be as compatible as possible with existing Ruby programs.
We have been working hard on MacRuby to make sure it behaves like MRI 1.9.×.

to

We want MacRuby to be as compatible as possible with existing Ruby programs.
We have been working hard on MacRuby to make sure it behaves like Koichi's
Ruby Interpreter (KRI) or the more commonly used name, *Yet
another Ruby
VM (YARV), for Ruby *1.9.×.

In any case, great work and I'll start playing with this release.

-Conrad

On Wed, Oct 7, 2009 at 9:13 PM, Laurent Sansonetti wrote:

> Hi,
>
> The first beta release of MacRuby 0.5 is out! I prepared some notes here:
>
> http://www.macruby.org/blog/2009/10/07/macruby05b1.html
>
> The goal is to go through a few beta releases before releasing the final
> 0.5.
>
> Please give it a try and report us bugs & feedback :)
>
> Laurent
> ___
> 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] [0.5 beta 1] issues running ruby specs with macrake and rake

2009-10-07 Thread Conrad Taylor
a)  running spec:ci using macrake segmentation fault

$ macrake spec:ci
unknown: warning: already initialized constant TOPDIR
unknown: warning: already initialized constant CONFIG
unknown: warning: already initialized constant MAKEFILE_CONFIG
Segmentation fault

b)  running spec:ci using rake aborts

$ rake spec:ci
(in /Users/conradwt/macruby.dir/projects/macruby-trunk)
./mspec/bin/mspec ci -B ./spec/macruby.mspec  :full
MacRuby version 0.5 (ruby 1.9.0) [universal-darwin10.0, x86_64]
.2009-10-07
23:02:23.167 macruby[11134:1b07] *** Terminating app due to uncaught
exception 'NameError', reason: 'undefined method `pwd' for module
`RbConfig''
*** Call stack at first throw:
(
0   CoreFoundation  0x7fff82a995a4
__exceptionPreprocess + 180
1   libobjc.A.dylib 0x7fff86ae3313
objc_exception_throw + 45
2   libmacruby.dylib0x00010017a185 rb_vm_raise + 197
3   libmacruby.dylib0x00010003f8c9 rb_exc_raise + 9
4   libmacruby.dylib0x00010003c3d4 rb_name_error +
260
5   libmacruby.dylib0x000100040154 rb_print_undef +
196
6   libmacruby.dylib0x00010012065d rb_export_method
+ 157
7   libmacruby.dylib0x000100120d09 rb_mod_modfunc +
441
8   libmacruby.dylib0x00010016d02f rb_vm_dispatch +
5679
9   fileutils.rbo   0x0001011bdea5 __ruby_scope1 +
197
)
terminate called after throwing an instance of 'NSException'
rake aborted!
Command failed with status (): [./mspec/bin/mspec ci -B
./spec/macruby.msp...]
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #367: Error in color.rb

2009-10-07 Thread MacRuby
#367: Error in color.rb
+---
 Reporter:  i.scr...@…  |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  blocker |   Milestone:  MacRuby 0.5  
Component:  MacRuby |Keywords:  Hotcocoa Color Error 
+---
 The file color.rb inside the hotcocoa/graphics directors is using a wrong
 class method!

 Following code has to be changed:

 COLORNAMES.each_key do |name|
   (class << self; self; end).define_method(name) do
 named(name)
   end
 end


 In this case define_singleton_method is the way to go.

 COLORNAMES.each_key do |name|
   (class << self; self; end).define_singleton_method(name) do
 named(name)
   end
 end

 Tom Fuerstner

-- 
Ticket URL: 
MacRuby 

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