You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should display the same warnings for "assignment in conditional" as in MRI.
Actual Behavior
The following cases differ, which prevents MRI's TestRubyOptions#test_assignment_in_conditional from passing. These are the only remaining issues for that test to be green.
Here's output comparing JRuby and MRI:
[] ~/projects/jruby $ jruby -Xbacktrace.style=mri -e "if a = [a]; end"
-e:1: warning: found = in conditional, should be ==
[] ~/projects/jruby $ jruby -Xbacktrace.style=mri -e "if a = {1=>2}; end"
[] ~/projects/jruby $ jruby -Xbacktrace.style=mri -e "if a = {}; end"
[] ~/projects/jruby $ ruby23 -e "if a = [a]; end"
[] ~/projects/jruby $ ruby23 -e "if a = {1=>2}; end"
-e:1: warning: found = in conditional, should be ==
[] ~/projects/jruby $ ruby23 -e "if a = {}; end"
-e:1: warning: found = in conditional, should be ==
The text was updated successfully, but these errors were encountered:
The "assignment" warning fix almost gets MRI's TestRubyoptions#
test_assignment_in_conditional, but there's a few cases where we
differ from MRI in warning output. See #3757.
Environment
JRuby 9.1 (HEAD)
Expected Behavior
We should display the same warnings for "assignment in conditional" as in MRI.
Actual Behavior
The following cases differ, which prevents MRI's TestRubyOptions#test_assignment_in_conditional from passing. These are the only remaining issues for that test to be green.
Here's output comparing JRuby and MRI:
The text was updated successfully, but these errors were encountered: