summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--lib/irb/locale.rb4
-rw-r--r--lib/irb/multi-irb.rb2
-rw-r--r--lib/irb/ruby-lex.rb4
-rw-r--r--lib/irb/ruby-token.rb2
-rw-r--r--lib/matrix.rb3
-rw-r--r--lib/shell/command-processor.rb10
7 files changed, 27 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 5bfd411351..9b1cde1359 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Thu Jun 28 00:21:28 2001 Keiju Ishitsuka <keiju@ishitsuka.com>
+
+ * lib/matrix.rb: resolve 'ruby -w' warnings.
+
+ * lib/irb/locale.rb: resolve 'ruby -w' warnings.
+
+ * lib/irb/multi-irb.rb: resolve 'ruby -w' warnings.
+
+ * lib/irb/ruby-lex.rb: fix problem for "\\M-\\..." and "\\C-\\..."
+ and resolve 'ruby -w' warnings.
+
+ * lib/irb/ruby-token.rb: fix typo
+
+ * lib/shell/command-processor.rb: resolve 'ruby -w' warnings.
+
Wed Jun 27 08:53:26 2001 Minero Aoki <aamine@loveruby.net>
* lib/net/pop.rb: new methods POP3.auth_only, POP3#auth_only
diff --git a/lib/irb/locale.rb b/lib/irb/locale.rb
index 0eeeae031d..e0a44f3421 100644
--- a/lib/irb/locale.rb
+++ b/lib/irb/locale.rb
@@ -62,7 +62,7 @@ module IRB
def print(*opts)
ary = opts.collect{|opt| String(opt)}
- super *ary
+ super(*ary)
end
def printf(*opts)
@@ -72,7 +72,7 @@ module IRB
def puts(*opts)
ary = opts.collect{|opt| String(opts)}
- super *ary
+ super(*ary)
end
def require(file, priv = nil)
diff --git a/lib/irb/multi-irb.rb b/lib/irb/multi-irb.rb
index 6e97512e27..77d9921ea8 100644
--- a/lib/irb/multi-irb.rb
+++ b/lib/irb/multi-irb.rb
@@ -90,7 +90,7 @@ module IRB
IRB.fail NoSuchJob, key unless @jobs[key]
@jobs[key] = nil
else
- catch (:EXISTS) do
+ catch(:EXISTS) do
@jobs.each_index do
|i|
if @jobs[i] and (@jobs[i][0] == key ||
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index 3a862002a6..3647617849 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -954,7 +954,7 @@ class RubyLex
ungetc
else
if (ch = getc) == "\\" #"
- read_escape(chrs)
+ read_escape
end
end
@@ -962,7 +962,7 @@ class RubyLex
if ch == "C" and (ch = getc) != "-"
ungetc
elsif (ch = getc) == "\\" #"
- read_escape(chrs)
+ read_escape
end
else
# other characters
diff --git a/lib/irb/ruby-token.rb b/lib/irb/ruby-token.rb
index 2e5715c9f7..373c8defea 100644
--- a/lib/irb/ruby-token.rb
+++ b/lib/irb/ruby-token.rb
@@ -218,7 +218,7 @@ module RubyToken
[:TkBACKQUOTE, TkOp, "`"],
- [:TkASSGIN, Token, "="],
+ [:TkASSIGN, Token, "="],
[:TkDOT, Token, "."],
[:TkLPAREN, Token, "("], #(exp)
[:TkLBRACK, Token, "["], #[arry]
diff --git a/lib/matrix.rb b/lib/matrix.rb
index 4821bababf..cf2f63765a 100644
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -219,7 +219,6 @@ class Matrix
row[j] = values[j]
row
}
- self
rows(rows, false)
end
@@ -897,7 +896,7 @@ class Vector
# ARITHMETIC
- def *(x) "is matrix or number"
+ def *(x)
case x
when Numeric
els = @elements.collect{|e| e * x}
diff --git a/lib/shell/command-processor.rb b/lib/shell/command-processor.rb
index fa253b3705..459cf858d0 100644
--- a/lib/shell/command-processor.rb
+++ b/lib/shell/command-processor.rb
@@ -241,7 +241,7 @@ class Shell
def transact(&block)
begin
- @shell.instance_eval &block
+ @shell.instance_eval(&block)
ensure
check_point
end
@@ -251,7 +251,7 @@ class Shell
# internal commands
#
def out(dev = STDOUT, &block)
- dev.print transact &block
+ dev.print transact(&block)
end
def echo(*strings)
@@ -352,7 +352,7 @@ class Shell
#
def self.def_system_command(command, path = command)
begin
- eval ((d = %Q[def #{command}(*opts)
+ eval((d = %Q[def #{command}(*opts)
SystemCommand.new(@shell, '#{path}', *opts)
end]), nil, __FILE__, __LINE__ - 1)
rescue SyntaxError
@@ -387,14 +387,14 @@ class Shell
if iterator?
@alias_map[ali.intern] = proc
- eval ((d = %Q[def #{ali}(*opts)
+ eval((d = %Q[def #{ali}(*opts)
@shell.__send__(:#{command},
*(CommandProcessor.alias_map[:#{ali}].call *opts))
end]), nil, __FILE__, __LINE__ - 1)
else
args = opts.collect{|opt| '"' + opt + '"'}.join ","
- eval ((d = %Q[def #{ali}(*opts)
+ eval((d = %Q[def #{ali}(*opts)
@shell.__send__(:#{command}, #{args}, *opts)
end]), nil, __FILE__, __LINE__ - 1)
end