Permalink
Browse files

Nicer definition of gets in LoggingTCPSocket

  • Loading branch information...
programble committed Aug 30, 2010
1 parent 9bba379 commit 0482a1cf772a7ad38251f883f79776448936e69c
Showing with 1 addition and 3 deletions.
  1. +1 −3 rubarb.rb
View
@@ -14,9 +14,7 @@ def puts s
end
def gets
- s = super
- @file.puts ">>>#{s}"
- s
+ super.tap{|s| @file.puts ">>>#{s}" }
end
end

0 comments on commit 0482a1c

Please sign in to comment.