Created
July 29, 2008 23:01
-
-
Save paul/3194 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
class_eval <<-EOS, __FILE__, __LINE__ | |
def bar=(*args, &block) | |
puts args.inspect | |
end | |
EOS | |
end | |
Foo.new.bar= 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ruby evaltest.rb | |
[1] | |
% /usr/local/bin/rbx evaltest.rb | |
[1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment