#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 ---------------------------+------------------------------------------------ module_function works for explicit declarations, but seems to have a problem (ArgumentError) with 1-arg splat methods when used implicitly. I think a fix here will help compatibility with various libraries (e.g., Linguistics). Best to show with code:
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> MacRuby <http://macruby.org/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel