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

Add ruby 2.4 support #101

Merged
merged 1 commit into from
Jun 13, 2017
Merged

Conversation

jrafanie
Copy link
Member

@jrafanie jrafanie commented Mar 24, 2017

* Copied the webmock patch from ManageIQ/manageiq#13104

* This code is looking for Bignum and fails on ruby 2.4. Bignum and Fixnum were merged to Integer in ruby 2.4. It doesn't look like can just replace Bignum with Integer. I tried.

EDIT: see ManageIQ/manageiq-smartstate#10

@jrafanie jrafanie changed the title [WIP ] Add ruby 2 4 support [WIP ] Add ruby 2.4 support Mar 24, 2017
@bdunne bdunne changed the title [WIP ] Add ruby 2.4 support [WIP] Add ruby 2.4 support Apr 3, 2017
@miq-bot miq-bot added the wip label Apr 3, 2017
@jrafanie
Copy link
Member Author

jrafanie commented Apr 5, 2017

@jerryk55 Please take a look at the second bullet in the description. We don't need to fix it right away, I can't tell how hard it is to get 2.3 and 2.4 compatibility.

@djberg96
Copy link
Contributor

That's because Integer == Fixnum and Integer == Bignum both return true in 2.4.

I think to maintain compatibility you're going to have to do something like this:

def too_big(num)
  bitness = ['a'].pack('P').length > 4 ? "64" : "32"
  if bitness == '32'
    raise something if num > 2**31
  else
    raise something if num > 2**63
  end
end

@Fryguy
Copy link
Member

Fryguy commented Jun 13, 2017

@jrafanie Where are we with Ruby 2.4 support. I have heard a lot about GC improvements in 2.4 and I would like for this to be the default for gaprindashvili. The sooner we can get it on appliances, the better, IMO.

@jrafanie jrafanie force-pushed the add_ruby_2_4_support branch from c9a9869 to 050a3e6 Compare June 13, 2017 17:51
@jrafanie
Copy link
Member Author

ok, this should be good to go when tests pass. Note smartstate code was extracted and the problematic conditional was removed in ManageIQ/manageiq-smartstate#10

@jrafanie jrafanie changed the title [WIP] Add ruby 2.4 support Add ruby 2.4 support Jun 13, 2017
@miq-bot miq-bot removed the wip label Jun 13, 2017
@miq-bot
Copy link
Member

miq-bot commented Jun 13, 2017

Checked commit jrafanie@050a3e6 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
0 files checked, 0 offenses detected
Everything looks fine. 👍

@djberg96
Copy link
Contributor

👍

@Fryguy Fryguy merged commit 1e06a77 into ManageIQ:master Jun 13, 2017
@Fryguy Fryguy added this to the Sprint 63 Ending Jun 19, 2017 milestone Jun 13, 2017
@Fryguy
Copy link
Member

Fryguy commented Jun 13, 2017

@chessbyte Please be sure to mark future extractions with Ruby 2.4.1 in the .travis.yml

@jrafanie jrafanie deleted the add_ruby_2_4_support branch June 13, 2017 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants