You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but some objects, apparently immutable objects, do not allow their singleton metaclasses to be modified:
>> x = 'hi'; def x.foo() end
=> nil
>> x = {}; def x.foo() end
=> nil
>> x = :sym; def x.foo() end
TypeError: can't define singleton method "foo" for Symbol
from (irb):16
from /Users/joshbronson/.rbenv/versions/1.9.3-p125/bin/irb:12:in `<main>'
>> x = 1; def x.foo() end
TypeError: can't define singleton method "foo" for Fixnum
from (irb):17
from /Users/joshbronson/.rbenv/versions/1.9.3-p125/bin/irb:12:in `<main>'
We need a different strategy for combining the http response with the parsed object. (There should probably be a container that has both.)
The text was updated successfully, but these errors were encountered:
I meant to fix this, but I got side-tracked. I'm adding this now, since @kornypoet is refactoring some bits of Vayacondios.
As far as I can tell from the doccos, this should work:
and this does work:
The problem I think, is that we're trying to add singleton methods to an arbitrary Ruby object here:
https://github.com/infochimps-labs/vayacondios/blob/leslie/lib/vayacondios/client/http_client.rb#L270
but some objects, apparently immutable objects, do not allow their singleton metaclasses to be modified:
We need a different strategy for combining the http response with the parsed object. (There should probably be a container that has both.)
The text was updated successfully, but these errors were encountered: