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

SystemStackError in did_you_mean gem when using undef #56

Closed
presidentbeef opened this issue Nov 14, 2015 · 2 comments
Closed

SystemStackError in did_you_mean gem when using undef #56

presidentbeef opened this issue Nov 14, 2015 · 2 comments
Labels

Comments

@presidentbeef
Copy link

This is with ruby 2.3.0preview1 (2015-11-11 trunk 52539) [x86_64-linux] which uses did_you_mean-1.0.0.beta3. I was about to file a bug at bugs.ruby-lang.org but then thought here might be better.

Example:

undef :a

Output when using ruby -d:

Exception `LoadError' at /home/justin/.rvm/rubies/ruby-2.3.0-preview1/lib/ruby/2.3.0/rubygems.rb:1241 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at /home/justin/.rvm/rubies/ruby-2.3.0-preview1/lib/ruby/2.3.0/rubygems.rb:1250 - cannot load such file -- rubygems/defaults/ruby
Exception `LoadError' at /home/justin/.rvm/rubies/ruby-2.3.0-preview1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:54 - cannot load such file -- did_you_mean
Exception `SystemStackError' at /home/justin/.rvm/gems/ruby-2.3.0-preview1@global/gems/did_you_mean-1.0.0.beta3/lib/did_you_mean/core_ext/name_error.rb:10 - stack level too deep
/home/justin/.rvm/gems/ruby-2.3.0-preview1@global/gems/did_you_mean-1.0.0.beta3/lib/did_you_mean/core_ext/name_error.rb:10:in `to_s': stack level too deep (SystemStackError)
    from /home/justin/.rvm/gems/ruby-2.3.0-preview1@global/gems/did_you_mean-1.0.0.beta3/lib/did_you_mean/spell_checkers/method_name_checker.rb:15:in `initialize'
    from /home/justin/.rvm/gems/ruby-2.3.0-preview1@global/gems/did_you_mean-1.0.0.beta3/lib/did_you_mean/core_ext/name_error.rb:25:in `new'
    from /home/justin/.rvm/gems/ruby-2.3.0-preview1@global/gems/did_you_mean-1.0.0.beta3/lib/did_you_mean/core_ext/name_error.rb:25:in `spell_checker'
    from /home/justin/.rvm/gems/ruby-2.3.0-preview1@global/gems/did_you_mean-1.0.0.beta3/lib/did_you_mean/core_ext/name_error.rb:21:in `corrections'
    from /home/justin/.rvm/gems/ruby-2.3.0-preview1@global/gems/did_you_mean-1.0.0.beta3/lib/did_you_mean/core_ext/name_error.rb:14:in `to_s'
    from /home/justin/.rvm/gems/ruby-2.3.0-preview1@global/gems/did_you_mean-1.0.0.beta3/lib/did_you_mean/spell_checkers/method_name_checker.rb:15:in `initialize'
    from /home/justin/.rvm/gems/ruby-2.3.0-preview1@global/gems/did_you_mean-1.0.0.beta3/lib/did_you_mean/core_ext/name_error.rb:25:in `new'
    from /home/justin/.rvm/gems/ruby-2.3.0-preview1@global/gems/did_you_mean-1.0.0.beta3/lib/did_you_mean/core_ext/name_error.rb:25:in `spell_checker'
     ... 9010 levels...
    from /home/justin/.rvm/gems/ruby-2.3.0-preview1@global/gems/did_you_mean-1.0.0.beta3/lib/did_you_mean/core_ext/name_error.rb:25:in `spell_checker'
    from /home/justin/.rvm/gems/ruby-2.3.0-preview1@global/gems/did_you_mean-1.0.0.beta3/lib/did_you_mean/core_ext/name_error.rb:21:in `corrections'
    from /home/justin/.rvm/gems/ruby-2.3.0-preview1@global/gems/did_you_mean-1.0.0.beta3/lib/did_you_mean/core_ext/name_error.rb:14:in `to_s'
    from test.rb:1:in `<main>'

This example came from trying to use safe_yaml which loads psych/deprecated which uses undef here: https://github.com/tenderlove/psych/blob/c1decb1fef5c77d84a93d5ac19a4961da914dd5c/lib/psych/deprecated.rb#L81

@yuki24 yuki24 added the Bug label Nov 15, 2015
@yuki24
Copy link
Member

yuki24 commented Nov 15, 2015

@presidentbeef Thanks for reporting! I'll take a look.

@yuki24
Copy link
Member

yuki24 commented Dec 9, 2015

As of d71740a, this gem no longer uses TracePoint API, thus this issue should be gone now. Thanks again for reporting!

@yuki24 yuki24 closed this as completed Dec 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants