8000 Add missing dependency by deivid-rodriguez · Pull Request #6 · ruby/mathn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add missing dependency #6

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

Merged
merged 2 commits into from
Feb 6, 2020
Merged

Add missing dependency #6

merged 2 commits into from
Feb 6, 2020

Conversation

deivid-rodriguez
Copy link
Contributor

This gem is deprecated since it was extracted out of ruby-core, but the extraction was done incorrectly, so it currently doesn't even work on ruby 2.7.

The issue is that the gem depends on the cmath library, but it's not listed as a dependency, so when the gem is installed, cmath is not installed, and using it fails like this:

$ gem install mathn
Fetching mathn-0.1.0.gem
Building native extensions. This could take a while...
Successfully installed mathn-0.1.0
1 gem installed
(add_missing_dependency) deivid@chaba ~/Code/ruby/mathn $ ruby -rmathn -e'puts 0'
Traceback (most recent call last):
	1: from /home/deivid/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:88:in `require'
/home/deivid/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:88:in `require': cannot load such file -- mathn (LoadError)
	5: from /home/deivid/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:152:in `require'
	4: from /home/deivid/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:164:in `rescue in require'
	3: from /home/deivid/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:164:in `require'
	2: from /home/deivid/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mathn-0.1.0/lib/mathn.rb:45:in `<top (required)>'
	1: from /home/deivid/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:88:in `require'
/home/deivid/.rbenv/versions/2.7.0/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:88:in `require': cannot load such file -- cmath.rb (LoadError)

This PR fixes the issue.

@marcandre marcandre requested a review from hsbt February 6, 2020 14:15
@hsbt hsbt merged commit 40e0d90 into ruby:master Feb 6, 2020
@deivid-rodriguez deivid-rodriguez deleted the add_missing_dependency branch February 6, 2020 23:20
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

Successfully merging this pull request may close these issues.

2 participants
0