Skip to content

Conversation

@aninder
Copy link

@aninder aninder commented Apr 28, 2016

Doing BasicObject.new , gives this error
Hirb Error: undefined method `respond_to?' for #BasicObject:0x007fa7c4ed23a8

@aninder
Copy link
Author

aninder commented Apr 28, 2016

the library is supporting quite a few legacy ruby versions, will have to do a few work arounds to support BasicObject on newer versions.

@aninder
Copy link
Author

aninder commented Apr 30, 2016

incompatibilities between ruby 2.3.1(version i have installed on my system) and 1.8.7 i found while solving this issue were,

str=""
str_meta =class << str
self
end

ruby - 2.3.1
1)
has Basic Object

str_meta.superclass == str.class #true

str_meta.ancestors[0] == str.class #false

Object.instance_methods #returns array of symbols

ruby - 1.8.7
1)
does not have BasicObject, it got added in 1.9

str_meta.superclass == str.class #false

str_meta.ancestors[0] == str.class #true

Object.instance_methods #returns array of strings

@aninder
Copy link
Author

aninder commented Apr 30, 2016

kudos to the braveheart maintainer who is supporting all these versions.
Not sure if he wants to add in support for BasicObject , but it was a fun exercise !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant