lib/rib/core/readline.rb in rib-1.1.6 vs lib/rib/core/readline.rb in rib-1.2.0
- old
+ new
@@ -17,5 +17,11 @@
def get_input
return super if Readline.disabled?
::Readline.readline(prompt, true)
end
end
+
+unless ::Readline::HISTORY.respond_to?(:last)
+ def (::Readline::HISTORY).last
+ self[-1]
+ end
+end