よろこべ初心者ども。達人プログラマのむかしのブログに、ruby1.9でendのチェックをする機能が紹介されている。
http://pragdave.blogs.pragprog.com/pragdave/2008/12/ruby-19-can-check-your-indentation.html
たとえばこんなコードがあったとして
class Example
 def meth1
  if Time.now.hours > 12
   puts "Afternoon"
 end
 def meth2
  # ...
 end
end
endがらみのエラーがあったときはruby1.9 に -wc をつけてやれば
dave[RUBY3/Book 8:26:51*] ruby -w t.rb
t.rb:5: warning: mismatched indentations at 'end' with 'if' at 3
t.rb:9: warning: mismatched indentations at 'end' with 'def' at 2
t.rb:10: syntax error, unexpected $end, expecting keyword_end
というメッセージがでる。5行目のendが3行目のif文と対応しているけど、
インデントが揃ってないよというメッセージ。
コメントでは「これこそ1.9のキラー機能だ」と絶賛されている。