lib/ripl/rc/eat_whites.rb in ripl-rc-0.1.5 vs lib/ripl/rc/eat_whites.rb in ripl-rc-0.2.0
- old
+ new
@@ -1,11 +1,13 @@
-require 'ripl'
+require 'ripl/rc/u'
-module Ripl::Rc; end
module Ripl::Rc::EatWhites
+ include Ripl::Rc::U
+
# don't print empty input
def print_result result
+ return super if EatWhites.disabled?
super unless @input.strip == ''
end
end
Ripl::Shell.include(Ripl::Rc::EatWhites)