What equivalents of codepad are there that run recent versions of Ruby?
I was trying to show that a code snippet doesn’t work, but codepad runs Ruby 1.8.6, so it’s theoretically possible that the code doesn’t work in 1.8.6 but works under 1.9.2.
I also tried using “Try Ruby”, but you can’t create anonymous or non-anonymous classes:
> H = Class.new
=> #<NameError: uninitialized constant H>
> Class.new
=> #<TypeError: can't dump anonymous class #<Class:0x155468081>>
> class J
.. end
=> nil
> J
=> #<NameError: uninitialized constant J>
There is ideone.com, running ruby-1.9.2 (proof).