4 ms·
You can use that to replace code by monkey patching $ cat hi.rb def method puts "hi" end method load("hello.rb") method $ c
by pmontra 11y ago
You can use that to replace code by monkey patching
$ cat hi.rb
def method
puts "hi"
end
method
load("hello.rb")
method
$ cat hello.rb
def method
puts "hello"
end
$ ruby hi.rb
hi
hello
You must engineer your application to execute the load method and that's it.
However I wonder if this is really equivalent to what Erlang does. I remember http://rvirding.blogspot.it/2008/01/virdings-first-rule-of-programming.html http://rvirding.blogspot.it/2008/01/virdings-first-rule-of-p...
- pmontra 11y agoInteresting post at http://blog.rkh.im/code-reloading http://blog.rkh.im/code-reloading