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

This depends on having Set loaded, it should require Set itself #1

Open
philomory opened this issue Jun 6, 2019 · 0 comments
Open

Comments

@philomory
Copy link

Steps to reproduce

irb(main):001:0> require 'erle'
NameError: uninitialized constant ERLE::Term::Set
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/erle-0.1.0/lib/erle/elements/term.rb:14:in `patterns'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/erle-0.1.0/lib/erle/elements/term.rb:18:in `pattern'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/erle-0.1.0/lib/erle/elements/numbers.rb:8:in `<class:Float>'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/erle-0.1.0/lib/erle/elements/numbers.rb:7:in `<module:ERLE>'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/erle-0.1.0/lib/erle/elements/numbers.rb:1:in `<top (required)>'
        from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/erle-0.1.0/lib/erle.rb:9:in `<top (required)>'
        from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require'
        from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
        from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        from (irb):1
        from C:/Ruby24-x64/bin/irb.cmd:19:in `<main>'
irb(main):002:0> require 'set'
=> true
irb(main):003:0> require 'erle'
=> true

Explanation

Set is part of the Ruby Standard Library, but not part of Ruby Core; thus, require 'set' is needed to load the Set class before using it; the erle gem instead leaves it up to the user to run require 'set' before require 'erle'.

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

No branches or pull requests

1 participant