[MacRuby-devel] [MacRuby] #347: module in module_function mode can't have methods with default args

MacRuby ruby-noreply at macosforge.org
Wed Sep 23 13:35:47 PDT 2009


#347: module in module_function mode can't have methods with default args
-------------------------------------+--------------------------------------
 Reporter:  mattaimonetti@…          |       Owner:  lsansonetti@…         
     Type:  defect                   |      Status:  new                   
 Priority:  blocker                  |   Milestone:  MacRuby 0.5           
Component:  MacRuby                  |    Keywords:  module_function module
-------------------------------------+--------------------------------------

Comment(by occam@…):

 FYI, this bug looks a lot like ticket #326.  For example,  contrary to the
 reported example, the following explicit module_function declaration works
 (even though the rolling declaration style "module_function;" does not
 work).

 macruby -e "module Foo; def bar(baz=42); baz;  end; module_function :bar;
 end; p Foo.bar(2)" => 2

 FYI, so if you need (or want) a workaround, explicitly declare the
 "module_function :bar", and it should work (until rolling declarations are
 working as well).

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/347#comment:1>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list