Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TruffleRuby doesn't print warnings for ininitialized variables #2595

Closed
gogainda opened this issue Feb 4, 2022 · 4 comments
Closed

TruffleRuby doesn't print warnings for ininitialized variables #2595

gogainda opened this issue Feb 4, 2022 · 4 comments

Comments

@gogainda
Copy link
Contributor

gogainda commented Feb 4, 2022

test.rb:

def undef
  puts "undef", $undefined
end
send(:undef)

Run: ruby -w test.rb

Expected output:

warning: global variable `$undefined' not initialized
@eregon
Copy link
Member

eregon commented Feb 4, 2022

Does it cause any compatibility issue in practice?
This might not be worth the implementation effort otherwise.

@eregon
Copy link
Member

eregon commented Feb 4, 2022

Actually we already track if they are defined/have been assigned, so it seems easier than I thought.

@eregon
Copy link
Member

eregon commented Feb 11, 2022

It seems used in RSpec tests

@andrykonchin andrykonchin self-assigned this Jun 30, 2022
@andrykonchin
Copy link
Member

Fixed in 9b53501, thank you for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants