Created
February 26, 2010 23:09
-
-
Save fj/316296 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Nanomachine | |
class Nanoparticle | |
def add(p) | |
while more? | |
p << self | |
end | |
end | |
end | |
# Ruby 1.9 includes nicer support for warnings that you didn't get in 1.8. | |
# | |
# [johnf@ubuntu-desktop][2010/02/27|18:08:17] | |
# [~/dev/talks/sandboxes/iruby]> iruby -W nano.rb | |
# iruby: warning: mismatched indentations: line 4:'while' and line 6:'end' | |
# iruby: warning: mismatched indentations: line 3:'def' and line 7:'end' | |
# iruby: warning: mismatched indentations: line 2:'class' and line 8:'end' | |
# nano.rb:8: syntax error, unexpected $end, expecting keyword_end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment