EthWorks / ethereum.rb

Ethereum library for the Ruby language
MIT License
731 stars 229 forks source link

BigDecimal.new is deprecated in Ruby 2.6.x, removed from 2.7.x #139

Closed Alexey1100 closed 4 years ago

Alexey1100 commented 4 years ago

Steps to reproduce

Ethereum::Formatter.new.to_wei(1)

Expected behavior

=> 1000000000000000000

Actual behavior

2.6.x:

...lib/ethereum/formatter.rb:76: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
=> 1000000000000000000

2.7.x:

=> nil

System configuration

Ruby version: 2.6.x, 2.7.x

Details: https://github.com/ruby/ruby/blob/v2_6_0/NEWS#stdlib-updates-outstanding-ones-only

kurotaky commented 4 years ago

@Alexey1100 thanks!