Project

General

Profile

Backport #7408

Assigned but unused warning cancelled by symbol

Added by agrimm (Andrew Grimm) over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:49659]

Description

If there is a symbol with the same name as an unused local variable, there is no "assigned but unused variable"

=begin
# no_warning.rb
def no_warning
foo = 1
{:foo => 1}
end

def has_warning
  foo = 1
  {:bar => 1}
end

$ ruby -v
ruby 2.0.0dev (2012-11-18) [x86_64-darwin10.8.0]
$ ruby -w no_warning.rb
no_warning.rb:8: warning: assigned but unused variable - foo

=end


Files

no_warning.rb (105 Bytes) no_warning.rb agrimm (Andrew Grimm), 11/20/2012 06:00 PM

Associated revisions

Revision 8e2839ba
Added by nobu (Nobuyoshi Nakada) over 6 years ago

parse.y: false usage of local variable

  • parse.y (parser_yylex): fix false usage of local variable, it cannot appear in fname state [ruby-core:49659] [Bug #7408]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 38039
Added by nobu (Nobuyoshi Nakada) over 6 years ago

parse.y: false usage of local variable

  • parse.y (parser_yylex): fix false usage of local variable, it cannot appear in fname state [ruby-core:49659] [Bug #7408]

Revision 38039
Added by nobu (Nobuyoshi Nakada) over 6 years ago

parse.y: false usage of local variable

  • parse.y (parser_yylex): fix false usage of local variable, it cannot appear in fname state [ruby-core:49659] [Bug #7408]

Revision 38039
Added by nobu (Nobuyoshi Nakada) over 6 years ago

parse.y: false usage of local variable

  • parse.y (parser_yylex): fix false usage of local variable, it cannot appear in fname state [ruby-core:49659] [Bug #7408]

Revision 38039
Added by nobu (Nobuyoshi Nakada) over 6 years ago

parse.y: false usage of local variable

  • parse.y (parser_yylex): fix false usage of local variable, it cannot appear in fname state [ruby-core:49659] [Bug #7408]

Revision 38039
Added by nobu (Nobuyoshi Nakada) over 6 years ago

parse.y: false usage of local variable

  • parse.y (parser_yylex): fix false usage of local variable, it cannot appear in fname state [ruby-core:49659] [Bug #7408]

Revision 38039
Added by nobu (Nobuyoshi Nakada) over 6 years ago

parse.y: false usage of local variable

  • parse.y (parser_yylex): fix false usage of local variable, it cannot appear in fname state [ruby-core:49659] [Bug #7408]

Revision f19478d5
Added by usa (Usaku NAKAMURA) over 6 years ago

merge revision(s) 38039: [Backport #7408]

    * parse.y (parser_yylex): fix false usage of local variable, it cannot
      appear in fname state [ruby-core:49659] [Bug #7408]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@38470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 38470
Added by usa (Usaku NAKAMURA) over 6 years ago

merge revision(s) 38039: [Backport #7408]

* parse.y (parser_yylex): fix false usage of local variable, it cannot
  appear in fname state [ruby-core:49659] [Bug #7408]

History

Updated by mame (Yusuke Endoh) over 6 years ago

  • Status changed from Open to Assigned
  • Assignee set to nobu (Nobuyoshi Nakada)
  • Target version set to 2.0.0
#2

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

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

This issue was solved with changeset r38039.
Andrew, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


parse.y: false usage of local variable

  • parse.y (parser_yylex): fix false usage of local variable, it cannot appear in fname state [ruby-core:49659] [Bug #7408]
#3

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport193
  • Status changed from Closed to Assigned
  • Assignee changed from nobu (Nobuyoshi Nakada) to usa (Usaku NAKAMURA)
  • Target version deleted (2.0.0)
#4

Updated by usa (Usaku NAKAMURA) over 6 years ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r38470.
Andrew, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 38039: [Backport #7408]

* parse.y (parser_yylex): fix false usage of local variable, it cannot
  appear in fname state [ruby-core:49659] [Bug #7408]

Also available in: Atom PDF