From 2ac523a89143f5d39239382e9e60f7d6e63657a0 Mon Sep 17 00:00:00 2001 From: keiju Date: Thu, 14 Apr 2005 06:16:08 +0000 Subject: [PATCH] * lib/irb/notifier.rb, lib/irb/output-method.rb, lib/irb/ext/history.rb fixed warning of 'ruby -w' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 ++++++- lib/irb/ext/history.rb | 2 +- lib/irb/notifier.rb | 2 +- lib/irb/output-method.rb | 6 +++--- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index b75a87258f..a19619cc26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ -Thu Apr 14 05:35:45 2005 Keiju Ishitsuka +Thu Apr 14 15:10:30 2005 Keiju Ishitsuka + + * lib/irb/notifier.rb, lib/irb/output-method.rb, lib/irb/ext/history.rb + fixed warning of 'ruby -w' + +Thu Apr 14 05:35:45 2005 Keiju Ishitsuka * doc/irb/irb.rd.ja: a lost of release IRB 0.9.5. diff --git a/lib/irb/ext/history.rb b/lib/irb/ext/history.rb index 1e978181ae..40f8692e8b 100644 --- a/lib/irb/ext/history.rb +++ b/lib/irb/ext/history.rb @@ -33,7 +33,7 @@ module IRB attr_reader :eval_history def eval_history=(no) if no - if @eval_history + if defined?(@eval_history) && @eval_history @eval_history_values.size(no) else @eval_history_values = History.new(no) diff --git a/lib/irb/notifier.rb b/lib/irb/notifier.rb index 22752bf894..c8e66fa859 100644 --- a/lib/irb/notifier.rb +++ b/lib/irb/notifier.rb @@ -52,7 +52,7 @@ module IRB def puts(*objs) if notify? - @base_notifier.puts *objs.collect{|obj| prefix + obj.to_s} + @base_notifier.puts(*objs.collect{|obj| prefix + obj.to_s}) end end diff --git a/lib/irb/output-method.rb b/lib/irb/output-method.rb index 93db767de4..b9a3a8851e 100644 --- a/lib/irb/output-method.rb +++ b/lib/irb/output-method.rb @@ -68,18 +68,18 @@ module IRB end def pp(*objs) - puts *objs.collect{|obj| obj.inspect} + puts(*objs.collect{|obj| obj.inspect}) end def ppx(prefix, *objs) - puts *objs.collect{|obj| prefix+obj.inspect} + puts(*objs.collect{|obj| prefix+obj.inspect}) end end class StdioOutputMethod