Skip to content

Commit

Permalink
* lib/matrix.rb: resolve 'ruby -w' warnings.
Browse files Browse the repository at this point in the history
* 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/trunk@1550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
keiju committed Jun 27, 2001
1 parent cf37626 commit cc13bb4
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 13 deletions.
15 changes: 15 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/irb/locale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def readline(*rs)

def print(*opts)
ary = opts.collect{|opt| String(opt)}
super *ary
super(*ary)
end

def printf(*opts)
Expand All @@ -72,7 +72,7 @@ def printf(*opts)

def puts(*opts)
ary = opts.collect{|opt| String(opts)}
super *ary
super(*ary)
end

def require(file, priv = nil)
Expand Down
2 changes: 1 addition & 1 deletion lib/irb/multi-irb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def delete(key)
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 ||
Expand Down
4 changes: 2 additions & 2 deletions lib/irb/ruby-lex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -954,15 +954,15 @@ def read_escape
ungetc
else
if (ch = getc) == "\\" #"
read_escape(chrs)
read_escape
end
end

when "C", "c", "^"
if ch == "C" and (ch = getc) != "-"
ungetc
elsif (ch = getc) == "\\" #"
read_escape(chrs)
read_escape
end
else
# other characters
Expand Down
2 changes: 1 addition & 1 deletion lib/irb/ruby-token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def Token(token, value = nil)

[:TkBACKQUOTE, TkOp, "`"],

[:TkASSGIN, Token, "="],
[:TkASSIGN, Token, "="],
[:TkDOT, Token, "."],
[:TkLPAREN, Token, "("], #(exp)
[:TkLBRACK, Token, "["], #[arry]
Expand Down
3 changes: 1 addition & 2 deletions lib/matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ def Matrix.diagonal(*values)
row[j] = values[j]
row
}
self
rows(rows, false)
end

Expand Down Expand Up @@ -897,7 +896,7 @@ def hash

# ARITHMETIC

def *(x) "is matrix or number"
def *(x)
case x
when Numeric
els = @elements.collect{|e| e * x}
Expand Down
10 changes: 5 additions & 5 deletions lib/shell/command-processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def check_point

def transact(&block)
begin
@shell.instance_eval &block
@shell.instance_eval(&block)
ensure
check_point
end
Expand All @@ -251,7 +251,7 @@ def transact(&block)
# internal commands
#
def out(dev = STDOUT, &block)
dev.print transact &block
dev.print transact(&block)
end

def echo(*strings)
Expand Down Expand Up @@ -352,7 +352,7 @@ def find_system_command(command)
#
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
Expand Down Expand Up @@ -387,14 +387,14 @@ def self.alias_command(ali, command, *opts, &block)
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
Expand Down

0 comments on commit cc13bb4

Please sign in to comment.