[MacRuby-devel] [MacRuby] #265: 'include' on 'class Class' doesn't define methods on future classes
MacRuby
ruby-noreply at macosforge.org
Tue May 26 17:01:16 PDT 2009
#265: 'include' on 'class Class' doesn't define methods on future classes
---------------------------------+------------------------------------------
Reporter: nate@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
---------------------------------+------------------------------------------
Greetings, the following code sample works on ruby 1.8 and 1.9 but is
giving an error in MacRuby 0.0.4.
{{{
module B
def whisper(a)
puts a.downcase
end
end
class Class
include B
def say(a)
puts a
end
end
class A
say("hi")
whisper("BYE")
end
# ruby 1.8.* & 1.9.* =>
# hi
# bye
#
# macruby 0.0.4 =>
# hi
# class.rb:16:in `<class:A>': undefined method `whisper' for A:Class
(NoMethodError)
# from class.rb:14:in `<main>'
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/265>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list