[ https://issues.apache.org/jira/browse/PROTON-1519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123368#comment-16123368 ]
ASF subversion and git services commented on PROTON-1519: --------------------------------------------------------- Commit b4e1dd08fa9c19707180d5e5f059ed13600a48d1 in qpid-proton's branch refs/heads/master from [~Fryguy] [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=b4e1dd0 ] PROTON-1519 ruby: Integer mapping does not work with Ruby 2.4 Ruby < 2.4 had separate Fixnum, Bignum subclasses of Integer. Ruby 2.4 makes them all the same class, this breaks class-equality type mapping in mapping.rb. Replaced all uses of Fixnum/Bignum with Integer. Type-mapping now uses superclass match - type X maps if X is known OR if any superclass of X is known. > qpid_proton 0.17.0 Ruby gem does not work with Ruby 2.4.1 > --------------------------------------------------------- > > Key: PROTON-1519 > URL: https://issues.apache.org/jira/browse/PROTON-1519 > Project: Qpid Proton > Issue Type: Bug > Components: ruby-binding > Affects Versions: 0.17.0 > Environment: Ruby 2.4.1 on macOS Sierra 10.12.5 > Reporter: Jason Frey > Assignee: Alan Conway > Labels: patch > Fix For: proton-c-0.18.0 > > > qpid_proton 0.17.0 was built successfully from source with > {code} > > cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DLIB_INSTALL_DIR=/usr/local/lib > > make install > {code} > Installing the gem with Ruby 2.4.1 from rubygems.org was successful > {code} > > gem install qpid_proton > Building native extensions. This could take a while... > Successfully installed qpid_proton-0.17.0 > 1 gem installed > {code} > However, using the gem fails with: "RuntimeError: entry exists for Integer" > {code} > > irb > [1] pry(main)> RUBY_DESCRIPTION > => "ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin15]" > [2] pry(main)> require 'qpid_proton' > /Users/jfrey/.gem/ruby/2.4.1/gems/qpid_proton-0.17.0/lib/codec/mapping.rb:99: > warning: constant ::Fixnum is deprecated > /Users/jfrey/.gem/ruby/2.4.1/gems/qpid_proton-0.17.0/lib/codec/mapping.rb:99: > warning: constant ::Bignum is deprecated > RuntimeError: entry exists for Integer > from (qpid_proton-0.17.0) lib/codec/mapping.rb:55:in `block in initialize' > (qpid_proton-0.17.0) lib/codec/mapping.rb:54:in `each' > (qpid_proton-0.17.0) lib/codec/mapping.rb:54:in `initialize' > (qpid_proton-0.17.0) lib/codec/mapping.rb:99:in `new' > (qpid_proton-0.17.0) lib/codec/mapping.rb:99:in `<module:Codec>' > (qpid_proton-0.17.0) lib/codec/mapping.rb:20:in `<top (required)>' > (ruby-2.4.1) lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in > `require' > (ruby-2.4.1) lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in > `require' > (qpid_proton-0.17.0) lib/qpid_proton.rb:54:in `<top (required)>' > (ruby-2.4.1) lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in > `require' > (ruby-2.4.1) lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in > `rescue in require' > (ruby-2.4.1) lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in > `require' > (pry):1:in `<main>' > {code} > Note that the above steps are all successful with Ruby 2.3.3 > {code} > > irb > [1] pry(main)> RUBY_DESCRIPTION > => "ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin15]" > [2] pry(main)> require 'qpid_proton' > => true > [3] pry(main)> Qpid::Proton > => Qpid::Proton > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org