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

Fixes ruby deprecation warning regarding bigdecimal will be moved out from stdlib soon #1068

Merged

Conversation

simonneutert
Copy link
Contributor

@simonneutert simonneutert commented Jan 20, 2024

What/Why

When using this gem in a project a warning is thrown.

/usr/local/bundle/gems/money-6.16.0/lib/money.rb:1: 
  warning: 
    bigdecimal was loaded from the standard library,  
    but will no longer be part of the default gems since  
    Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec.  
    Also contact author of money-6.16.0 to add bigdecimal  
    into its gemspec.

Shopify has a related issue to the topic, see their issue #1772.

What was done

  • fixed the specs, as one was erroring out. This could potentially break how CHF (Swiss Franks) were supposed to work. Please see Add space to CHF format #1055 and provide some feedback 🙏
  • add bigdecimal gem to gemspec file with a condition for the used version of the gem
  • entry in CHANGELOG.md and AUTHORS

simonneutert and others added 5 commits January 20, 2024 23:15
warning: bigdecimal was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec.
@semmons99 semmons99 merged commit 79989af into RubyMoney:main Mar 13, 2024
6 of 7 checks passed
@semmons99
Copy link
Member

ty

Comment on lines +17 to +18

s.add_dependency "bigdecimal", "~> 3.1" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('6.19.0')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, I have some concerns about this implementation, in example 6.18.0 should be compatible with Ruby 3.4 and it should require bigdecimal.

This is checking that the current RUBY VERSION (3.4 at most) is >= 6.19.0, which will not be the case for the next few years

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you please submit an alt. will hold any release until we are all satisfied

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing that 👍🏼

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.

3 participants