T
Tony Arcieri
[Note: parts of this message were removed to make it a legal post.]
I am used to Ruby being a rather reflective language that gives carte
blanche to the programmer. So I found this rather surprising:
TypeError: no marshal_dump is defined for class Binding
Whaa?
NoMethodError: undefined method `new' for Binding:Class
Huh?
=> []
You're kidding me, right?
I would expect you to be able to do all of the above. In addition to that,
it's sure be nice to do some of the following:
=> "--- !ruby/object:Binding \na: 1\nb: 2\nc: 3\n" # YAML dump of a Binding
object
And hey, maybe Binding#inspect could give a little more information than its
object_id?
Canned responses to apologists:
= Why do you want to do that?
I don't know, why should you be able to redefine Integer#+?
= No really, why do you want to do that?
I would like to implement a remote REPL with a stateless Ruby server and a
non-Ruby client
= Just use DRb!
I am really not wanting to open up an addition port just for DRb nor pursue
solutions which involve a non-Ruby client talking the DRb protocol.
Embedding some form of Ruby interpreter client side is not an option.
Props to Rubinius for fixing some of these problems!
irb(main):001:0> Binding.new
=> #<Binding:0x2e0>
Yay! A clean binding!
=> "\004\bo:\fBinding\000"
Amazing!
I am used to Ruby being a rather reflective language that gives carte
blanche to the programmer. So I found this rather surprising:
TypeError: no marshal_dump is defined for class Binding
Whaa?
NoMethodError: undefined method `new' for Binding:Class
Huh?
=> []
You're kidding me, right?
I would expect you to be able to do all of the above. In addition to that,
it's sure be nice to do some of the following:
=> "--- !ruby/object:Binding \na: 1\nb: 2\nc: 3\n" # YAML dump of a Binding
object
And hey, maybe Binding#inspect could give a little more information than its
object_id?
Canned responses to apologists:
= Why do you want to do that?
I don't know, why should you be able to redefine Integer#+?
= No really, why do you want to do that?
I would like to implement a remote REPL with a stateless Ruby server and a
non-Ruby client
= Just use DRb!
I am really not wanting to open up an addition port just for DRb nor pursue
solutions which involve a non-Ruby client talking the DRb protocol.
Embedding some form of Ruby interpreter client side is not an option.
Props to Rubinius for fixing some of these problems!
irb(main):001:0> Binding.new
=> #<Binding:0x2e0>
Yay! A clean binding!
=> "\004\bo:\fBinding\000"
Amazing!