Hello!

I need to include methods from module 'A' into global scope. But i have
faced problem, it does interfere with OpenStruct.
The Code:
# ------------------------------
require 'ostruct'

module A
  def text; puts "The 'text' method from the 'A' module." end
end
include A

os = OpenStruct.new(:text => "Text from the 'OpenStruct'")

puts os.text #=> The 'text' method from the 'A' module. \n nil
# ------------------------------
How it can be solved?

Desired behavior should be:
puts os.text #=> Text from the 'OpenStruct'

Thanks!
-- 
Posted via http://www.ruby-forum.com/.