Skip to content

Instantly share code, notes, and snippets.

@fj
Created February 26, 2010 23:09
Show Gist options
  • Save fj/316296 to your computer and use it in GitHub Desktop.
Save fj/316296 to your computer and use it in GitHub Desktop.
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