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

Ruby 3.3 warnings about gems being removed from the standard library #247

Open
zorab47 opened this issue Oct 1, 2024 · 0 comments
Open

Comments

@zorab47
Copy link

zorab47 commented Oct 1, 2024

General information

  • SDK/Library version: 4.22
  • Environment: Sandbox and Production
  • Language, language version, and OS: Ruby 3.3.x

Issue description

Loading the braintree Ruby gem emits warnings about gems being removed from the standard library in a future version of Ruby. The following gems should be added as dependencies in the gemfile:

  • base64
  • bigdecimal
  • ostruct
❯ ruby -v
ruby 3.3.4 (2024-07-09 revision be1089c8ec) [x86_64-darwin23]

❯ ruby braintree_ruby_dependency_warnings.rb
/Users/$HOME/.gem/ruby/3.3.4/gems/braintree-4.22.0/lib/braintree.rb:1: warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec. Also contact author of braintree-4.22.0 to add base64 into its gemspec.
/Users/$HOME/.gem/ruby/3.3.4/gems/braintree-4.22.0/lib/braintree.rb:2: 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 braintree-4.22.0 to add bigdecimal into its gemspec.

It isn't listed when running require "braintree" but ostruct is another of the gems used in the Braintree::WebhookNotification class. It is listed in my applications log messages when processing webhooks:

/usr/local/bundle/gems/braintree-4.22.0/lib/braintree/webhook_notification.rb:1: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.

You can reproduce by running the following with Ruby 3.3:

require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem 'braintree', require: false
end

require "braintree"
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