[MacRuby] #336: Defining a method with a colon somewhere in the name and whitespace at the end will loose the trailing whitespace. (was: NoMethodError with shoulda tests) (was: NoMethodError with shoulda tests)
MacRuby
ruby-noreply at macosforge.org
Sat Dec 4 14:06:39 PST 2010
#336: Defining a method with a colon somewhere in the name and whitespace at the
end will loose the trailing whitespace. (was: NoMethodError with shoulda
tests)
----------------------------------------+-----------------------------------
Reporter: macruby@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: major | Milestone: MacRuby 1.0
Component: MacRuby | Keywords: #reduction
----------------------------------------+-----------------------------------
Changes (by eloy.de.enige@…):
* keywords: shoulda => #reduction
* milestone: => MacRuby 1.0
Comment:
{{{
class X
# no longer ends with whitespace after defining
define_method(:"method with :colon and ending with whitespace ") {}
# but this one does not have a colon, which maintains the whitespace
define_method(:"method without colon and ending with whitespace ") {}
p instance_methods(false)
end
}}}
{{{
% macruby t.rb
[:"method without colon and ending with whitespace ", :"method with :colon
and ending with whitespace"]
% ruby19 t.rb
[:"method with :colon and ending with whitespace ", :"method without colon
and ending with whitespace "]
}}}
So the bug is probably in code that picks it up as a selector (because of
the colon).
--
Ticket URL: <http://www.macruby.org/trac/ticket/336#comment:9>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list