Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Rubinius does not warn about assigned but unused variable #2054

Closed
agrimm opened this Issue · 1 comment

2 participants

@agrimm
ruby -w -e "def foo() a = 2; end"

will produce a warning
-e:1: warning: assigned but unused variable - a
in YARV Ruby, but in Rubinius, it doesn't produce a warning

$ ruby -w -e "def foo() a = 2; end"
-e:1: warning: assigned but unused variable - a
$ ruby --version
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin10.8.0]
$ rvm use rbx-head
Using /Users/agrimm/.rvm/gems/rbx-head
$ ruby -X19 -w -e "def foo() a = 2; end"
$ ruby -X19 --version
rubinius 2.0.0rc1 (1.9.3 release 2012-11-02 JI) [x86_64-apple-darwin10.8.0]

This is also the case in JRuby: https://jira.codehaus.org/browse/JRUBY-6905

@brixen
Owner

Rubinius does not implement MRI's parser warnings. In the future we'll add a proper configurable, programmable, semantically correct lint tool.

@brixen brixen closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.