mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d2d8cb7072
commit
5655368467
7 changed files with 27 additions and 13 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
||||||
|
Thu Jun 28 00:36:19 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:04 2001 Minero Aoki <aamine@loveruby.net>
|
Wed Jun 27 08:53:04 2001 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
* lib/net/pop.rb: new methods POP3.auth_only, POP3#auth_only
|
* lib/net/pop.rb: new methods POP3.auth_only, POP3#auth_only
|
||||||
|
|
|
@ -62,7 +62,7 @@ module IRB
|
||||||
|
|
||||||
def print(*opts)
|
def print(*opts)
|
||||||
ary = opts.collect{|opt| String(opt)}
|
ary = opts.collect{|opt| String(opt)}
|
||||||
super *ary
|
super(*ary)
|
||||||
end
|
end
|
||||||
|
|
||||||
def printf(*opts)
|
def printf(*opts)
|
||||||
|
@ -72,7 +72,7 @@ module IRB
|
||||||
|
|
||||||
def puts(*opts)
|
def puts(*opts)
|
||||||
ary = opts.collect{|opt| String(opts)}
|
ary = opts.collect{|opt| String(opts)}
|
||||||
super *ary
|
super(*ary)
|
||||||
end
|
end
|
||||||
|
|
||||||
def require(file, priv = nil)
|
def require(file, priv = nil)
|
||||||
|
|
|
@ -90,7 +90,7 @@ module IRB
|
||||||
IRB.fail NoSuchJob, key unless @jobs[key]
|
IRB.fail NoSuchJob, key unless @jobs[key]
|
||||||
@jobs[key] = nil
|
@jobs[key] = nil
|
||||||
else
|
else
|
||||||
catch (:EXISTS) do
|
catch(:EXISTS) do
|
||||||
@jobs.each_index do
|
@jobs.each_index do
|
||||||
|i|
|
|i|
|
||||||
if @jobs[i] and (@jobs[i][0] == key ||
|
if @jobs[i] and (@jobs[i][0] == key ||
|
||||||
|
|
|
@ -954,7 +954,7 @@ class RubyLex
|
||||||
ungetc
|
ungetc
|
||||||
else
|
else
|
||||||
if (ch = getc) == "\\" #"
|
if (ch = getc) == "\\" #"
|
||||||
read_escape(chrs)
|
read_escape
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -962,7 +962,7 @@ class RubyLex
|
||||||
if ch == "C" and (ch = getc) != "-"
|
if ch == "C" and (ch = getc) != "-"
|
||||||
ungetc
|
ungetc
|
||||||
elsif (ch = getc) == "\\" #"
|
elsif (ch = getc) == "\\" #"
|
||||||
read_escape(chrs)
|
read_escape
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
# other characters
|
# other characters
|
||||||
|
|
|
@ -218,7 +218,7 @@ module RubyToken
|
||||||
|
|
||||||
[:TkBACKQUOTE, TkOp, "`"],
|
[:TkBACKQUOTE, TkOp, "`"],
|
||||||
|
|
||||||
[:TkASSGIN, Token, "="],
|
[:TkASSIGN, Token, "="],
|
||||||
[:TkDOT, Token, "."],
|
[:TkDOT, Token, "."],
|
||||||
[:TkLPAREN, Token, "("], #(exp)
|
[:TkLPAREN, Token, "("], #(exp)
|
||||||
[:TkLBRACK, Token, "["], #[arry]
|
[:TkLBRACK, Token, "["], #[arry]
|
||||||
|
|
|
@ -219,7 +219,6 @@ class Matrix
|
||||||
row[j] = values[j]
|
row[j] = values[j]
|
||||||
row
|
row
|
||||||
}
|
}
|
||||||
self
|
|
||||||
rows(rows, false)
|
rows(rows, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -897,7 +896,7 @@ class Vector
|
||||||
|
|
||||||
# ARITHMETIC
|
# ARITHMETIC
|
||||||
|
|
||||||
def *(x) "is matrix or number"
|
def *(x)
|
||||||
case x
|
case x
|
||||||
when Numeric
|
when Numeric
|
||||||
els = @elements.collect{|e| e * x}
|
els = @elements.collect{|e| e * x}
|
||||||
|
|
|
@ -241,7 +241,7 @@ class Shell
|
||||||
|
|
||||||
def transact(&block)
|
def transact(&block)
|
||||||
begin
|
begin
|
||||||
@shell.instance_eval &block
|
@shell.instance_eval(&block)
|
||||||
ensure
|
ensure
|
||||||
check_point
|
check_point
|
||||||
end
|
end
|
||||||
|
@ -251,7 +251,7 @@ class Shell
|
||||||
# internal commands
|
# internal commands
|
||||||
#
|
#
|
||||||
def out(dev = STDOUT, &block)
|
def out(dev = STDOUT, &block)
|
||||||
dev.print transact &block
|
dev.print transact(&block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def echo(*strings)
|
def echo(*strings)
|
||||||
|
@ -352,7 +352,7 @@ class Shell
|
||||||
#
|
#
|
||||||
def self.def_system_command(command, path = command)
|
def self.def_system_command(command, path = command)
|
||||||
begin
|
begin
|
||||||
eval ((d = %Q[def #{command}(*opts)
|
eval((d = %Q[def #{command}(*opts)
|
||||||
SystemCommand.new(@shell, '#{path}', *opts)
|
SystemCommand.new(@shell, '#{path}', *opts)
|
||||||
end]), nil, __FILE__, __LINE__ - 1)
|
end]), nil, __FILE__, __LINE__ - 1)
|
||||||
rescue SyntaxError
|
rescue SyntaxError
|
||||||
|
@ -387,14 +387,14 @@ class Shell
|
||||||
if iterator?
|
if iterator?
|
||||||
@alias_map[ali.intern] = proc
|
@alias_map[ali.intern] = proc
|
||||||
|
|
||||||
eval ((d = %Q[def #{ali}(*opts)
|
eval((d = %Q[def #{ali}(*opts)
|
||||||
@shell.__send__(:#{command},
|
@shell.__send__(:#{command},
|
||||||
*(CommandProcessor.alias_map[:#{ali}].call *opts))
|
*(CommandProcessor.alias_map[:#{ali}].call *opts))
|
||||||
end]), nil, __FILE__, __LINE__ - 1)
|
end]), nil, __FILE__, __LINE__ - 1)
|
||||||
|
|
||||||
else
|
else
|
||||||
args = opts.collect{|opt| '"' + opt + '"'}.join ","
|
args = opts.collect{|opt| '"' + opt + '"'}.join ","
|
||||||
eval ((d = %Q[def #{ali}(*opts)
|
eval((d = %Q[def #{ali}(*opts)
|
||||||
@shell.__send__(:#{command}, #{args}, *opts)
|
@shell.__send__(:#{command}, #{args}, *opts)
|
||||||
end]), nil, __FILE__, __LINE__ - 1)
|
end]), nil, __FILE__, __LINE__ - 1)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue