[MacRuby-devel] [MacRuby] #347: module in module_function mode can't have methods with default args
MacRuby
ruby-noreply at macosforge.org
Thu Oct 15 21:54:46 PDT 2009
#347: module in module_function mode can't have methods with default args
-------------------------------------+--------------------------------------
Reporter: mattaimonetti@… | Owner: lsansonetti@…
Type: defect | Status: closed
Priority: blocker | Milestone: MacRuby 0.5
Component: MacRuby | Resolution: fixed
Keywords: module_function module |
-------------------------------------+--------------------------------------
Changes (by lsansonetti@…):
* status: new => closed
* resolution: => fixed
Old description:
> {{{
> $ macruby -e "module Foo; module_function; def bar(baz=42); baz; end;
> end; p Foo.bar(2)"
> => -e:1:in `<main>': wrong number of arguments (1 for 0) (ArgumentError)
> }}}
>
> {{{
> $ macruby -e "module Foo; def bar(baz=42); baz; end; end; include Foo; p
> bar(2)"
> => 2
> }}}
>
> {{{
> $ ruby19 -e "module Foo; module_function; def bar(baz=42); baz; end; end;
> p Foo.bar(2)"
> => 2
> }}}
New description:
{{{
$ macruby -e "module Foo; module_function; def bar(baz=42); baz; end; end;
p Foo.bar(2)"
=> -e:1:in `<main>': wrong number of arguments (1 for 0) (ArgumentError)
}}}
{{{
$ macruby -e "module Foo; def bar(baz=42); baz; end; end; include Foo; p
bar(2)"
=> 2
}}}
{{{
$ ruby19 -e "module Foo; module_function; def bar(baz=42); baz; end; end;
p Foo.bar(2)"
=> 2
}}}
--
Comment:
Should be fixed in r2828.
--
Ticket URL: <http://www.macruby.org/trac/ticket/347#comment:2>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list