#326: module_function implicit use breaks (ArgumentError) with 1-arg splat
methods (w/test code)
---------------------------+------------------------------------------------
Reporter: oc...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: major | Milestone:
Component: MacRuby | Keywords: module_function splat ArgumentError
---------------------------+------------------------------------------------
Comment(by oc...@…):
Not sure what happened to the formatting. Try replying to the ticket, and
copy from the reply (original formatting is preserved in the reply).
Perhaps this will help:
{{{
module SplatTesting
def use( *languages )
p "def use( *languages )"
end
module_function :use
module_function
def useBROKEN( *languages )
p "def useBROKEN( *languages )"
end
end
SplatTesting.use # => "def use( *languages )"
SplatTesting.use 'foo' # => "def use( *languages )"
SplatTesting.useBROKEN # => "def useBROKEN( *languages )"
SplatTesting.useBROKEN 'foo' # wrong number of arguments (1 for 0)
for useBROKEN: (ArgumentError)
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/326#comment:1>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel