lib/rib/test.rb in rib-1.1.6 vs lib/rib/test.rb in rib-1.2.0
- old
+ new
@@ -64,22 +64,13 @@
Rib::Readline.enabled?
end
def stub_readline
stub(::Readline).readline(is_a(String), true){
- (::Readline::HISTORY << str.chomp)[-1]
+ (::Readline::HISTORY << str.chomp).last
}
end
-
- # TODO: history.clear is MRI 1.9+
- def clear_history history
- if history.respond_to?(:clear)
- history.clear
- else
- history.pop until history.empty?
- end
- end
end
module Kernel
def eq? rhs
self == rhs
@@ -87,6 +78,7 @@
end
Rib::Blackhole = Object.new
b = Rib::Blackhole.singleton_class
b.instance_methods(true).each{ |m|
- b.send(:undef_method, m) unless [:object_id, :__send__].include?(m) }
+ b.send(:undef_method, m) unless
+ [:object_id, :__send__, :__id__].include?(m) }