Skip to content

Instantly share code, notes, and snippets.

@jfirebaugh
Created October 26, 2011 04:19
Show Gist options
  • Select an option

  • Save jfirebaugh/1315419 to your computer and use it in GitHub Desktop.

Select an option

Save jfirebaugh/1315419 to your computer and use it in GitHub Desktop.
pry(main)> c = Class.new(Numeric) do
pry(main)* def to_r
pry(main)* Rational(1)
pry(main)* end
pry(main)* end
=> #<Class:0x00000102097dd0>
pry(main)> c.new.quo(1)
ArgumentError: comparison of #<Class:0x00000102097dd0> with 0 failed
from (pry):13:in `<'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment