Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class IO
- alias :old_puts puts
- def puts(thing)
- if not thing.to_s.match(/\A\*\* Erubis [\d|\.]+\Z/)
- return old_puts(thing)
- end
- end
- end
- $stdout.puts "foo"
- $stdout.puts "** Erubis 2.3.4"
- $stdout.puts "bar"
- =======================
- pleb:~ will$ ruby puts.rb
- foo
- bar
Add Comment
Please, Sign In to add comment