Project

General

Profile

Actions

Bug #4130

closed

wrong line number with shadowing and unused variable

Added by nobu (Nobuyoshi Nakada) over 13 years ago. Updated about 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
1.9.3 r30114
Backport:
[ruby-dev:42718]

Description

=begin
shadowing outer local variableとassigned but unused variableの組み合わせで行番号がおかしくなります。

$ cat test.rb
def foo
a = 1
tap do |a|
end
end
$ ./ruby -v test.rb
ruby 1.9.3dev (2010-12-07 trunk 30114) [i386-darwin9.0]
test.rb:3: warning: shadowing outer local variable - a
test.rb:12456: warning: assigned but unused variable - a
=end

Actions #1

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r30124.
Nobuyoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0