I have a strange situation where the code:
c = Class.new { eval parser }
... works in IRB (ruby 1.9.3) but not in code. I've tried it with and without 'class Foo' wrapping my methods. This is frustrating, to say the least. I can copy the string parser's content directly into variable parser in irb, and then create the class using the above line and my methods are all there but when I do it in code, they aren't.
initialize': wrong number of arguments(1 for 0) (ArgumentError) from /home/devel/recc_ruby_mysql/ruby/Content/FetcherBuilder.rb:154:innew'codefetchclass = Class.new { eval parser } inst = fetchclass.new( @db ) puts inst.instance_variables.to_scode