Conversation
halostatue
reviewed
Jan 1, 2017
| raise "Invalid Change Action '#{@action}'" | ||
| end | ||
| raise "Invalid Position Type" unless @position.kind_of? Fixnum | ||
| raise "Invalid Position Type" unless @position.kind_of? Integer |
Owner
There was a problem hiding this comment.
I would rather see this in the same way that I saw a different fix in minitest;
class Diff::LCS::Change
IntClass = 1.class # :nodoc:
…
raise "Invalid Position Type" unless @position.kind_of? IntClass
end
Author
There was a problem hiding this comment.
Thanks for the review. It seems to me that it is used when we want to change behavior in 2.4 and 2.3 or lower.
However, Object#kind_of? (NOT Object#instance_of?) has been used here. Therefore, I think that it is better to use Integer as it is. Integer is a super class of Fixnum, so I think that is simple here.
There was a problem hiding this comment.
Hello @halostatue, could you reply for above @koic comment?
I really hope that this issue is fixed, and bumped (released), because this is one of the reason that cucumber is not supported on Ruby 2.4.
Thank you.
halostatue
added a commit
that referenced
this pull request
Jan 11, 2017
halostatue
added a commit
that referenced
this pull request
Jan 11, 2017
Merged
halostatue
added a commit
that referenced
this pull request
Jan 11, 2017
- Updated testing and gem infrastructure. - Cleaning up documentation. - Modernizing specs. - Silence Ruby 2.4 Fixnum deprecation warnings. Fixes #36, #38. - Ensure test dependencies are loaded. Fixes #33, #34 so that specs can be run independently. - Fix issue #1 with incorrect intuition of patch direction. Tentative fix, but the failure cases pass now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ruby 2.4.0 unifies Fixnum and Bignum into Integer.
https://bugs.ruby-lang.org/issues/12005
Fix following deprecated warnings in Ruby 2.4.0-preview3.
warning: constant ::Fixnum is deprecatedThanks.