>>148
C的に書く。

例:文字列の操作
× str = str.sub(/a/, 'A')
○ cc = 'a'; str.split(//).each {|c| if c == cc then cc = nil; 'A' else c; end}.join