Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Representation is using Fixnum which is deprecated in Ruby >= 2.4 #12

Open
mbigras opened this issue Apr 27, 2018 · 0 comments
Open

Representation is using Fixnum which is deprecated in Ruby >= 2.4 #12

mbigras opened this issue Apr 27, 2018 · 0 comments

Comments

@mbigras
Copy link

mbigras commented Apr 27, 2018

Reproduction steps

git clone https://github.com/mbigras/kashmir
cd kashmir/
git co ce9164251f7f27911f64a528e2cdb19c81533bc7
bundle install
ruby --version
# ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16]
bundle exec ruby <<'EOF'
require 'kashmir'
class Person
  include Kashmir
  
  def initialize(name, age)
    @name = name
    @age = age
  end
  
  representations do
    rep :name
    rep :age
  end
end
p Person.new('Netto Farah', 26).represent([:name, :age])
EOF
# /private/tmp/kashmir/lib/kashmir/representation.rb:114: warning: constant ::Fixnum is deprecated
# {:name=>"Netto Farah", :age=>26}

More details at:

Unify Fixnum and Bignum into Integer
Though ISO/IEC 30170:2012 doesn’t specify details of the Integer class, Ruby had two visible Integer classes: Fixnum and Bignum. Ruby 2.4 unifies them into Integer. All C extensions which touch the Fixnum or Bignum class need to be fixed.

See also the ticket and akr’s slides.

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

Successfully merging a pull request may close this issue.

1 participant