Ticket #265 (closed defect: fixed)
'include' on 'class Class' doesn't define methods on future classes
| Reported by: | nate@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | blocker | Milestone: | MacRuby 0.11 |
| Component: | MacRuby | Keywords: | |
| Cc: | nate@… |
Description
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>'
Change History
Note: See
TracTickets for help on using
tickets.

