I am pretty new to modify others gem, sorry about those noob mistakes

Thats exactly what it is, i will fix and test it, thx  

-=K=-


On Wednesday, February 5, 2014 at 1:26 PM, Kvle Putnam wrote:

> In lib/stupidedi.rb:
> > + unless params.last.is_a?(Hash) > + raise ArgumentError, > + "last argument must be :to => ..." > + end > + > + methods = params.init > + target = params.last.fetch(:to) or > + raise ArgumentError, > + ":to => ... cannot be nil" > + > + file, line, = Stupidedi.caller > + > + for m in methods > + if m.to_s =~ /=$/ > + class_eval(<<-RUBY, file, line.to_i - 1) > + def #{klass}.#{m}(value)  
> I think you're getting a syntax error because this line expands into a string like def Stupidedi::Foo::Bar.xyz and sometimes klass won't actually have a name, so you'll get def #<Class:0x038914>.xyz. In any case, putting the class name in the method name that way will make it a "class method" and not an "instance method".
> You might try doing something like this instead: klass.class_eval(<<-RUBY, ...) def #{m}(value). This way klass is never converted to a string, and the method is still defined as an instance method.
>  
> —
> Reply to this email directly or view it on GitHub (https://github.com/kputnam/stupidedi/pull/36/files#r9479021).
>  
>  
>