berkesokhan / rubydotnetcompiler

Automatically exported from code.google.com/p/rubydotnetcompiler
1 stars 0 forks source link

Module extend does not work - super is not correct #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Ruby.exe and Rubycompiler.exe svn 145

(extracted from optparse.rb)

module Arguable

 def self.extend_object(obj)
  puts "*#{self.class}*"    # <- *Module*
  puts "*#{super.class}*"   # <- breaks, should be *Array*
  super
  obj.instance_eval {@optparse = nil}
 end

 def diddle
  puts "diddling"
 end
end

ARGV.extend(Arguable)
ARGV.diddle     # <- should print 'diddling'

Original issue reported on code.google.com by djl.rif...@googlemail.com on 23 Oct 2007 at 12:48

GoogleCodeExporter commented 9 years ago

Original comment by meaningi...@gmail.com on 25 Oct 2007 at 2:13