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

Ruby 2.2.3 is out and fixes a bug with Hashie #316

Closed
wants to merge 1 commit into from

Conversation

pboling
Copy link
Contributor

@pboling pboling commented Oct 18, 2015

Travis Build Matrix updates:

  • Update Ruby 2.2.x from 2.2.2 to 2.2.3
  • Update Ruby 2.1.x from 2.1.6 to 2.1.7
  • Add Latest Rubinius **
    • as rbx-2.5.8
    • but keep existing 2.2.10

** Rubinius has had MANY releases since 2.2.10. Current is 2.5.8.

@dblock
Copy link
Member

dblock commented Oct 19, 2015

Lets get #313 into a CHANGELOG or an UPGRADING or something? I just want the fix in Ruby to be documented somewhere in case someone needs to retrace their steps. You can combine this PR and #313 if you want.

@pboling
Copy link
Contributor Author

pboling commented Oct 19, 2015

I'll add a CHANGELOG for this, and a note to UPGRADING. added in #313

@pboling
Copy link
Contributor Author

pboling commented Oct 19, 2015

@dblock This is ready, and will pass once #313 is merged.

@pboling pboling force-pushed the update-travis-build-matrix branch 2 times, most recently from 376c0df to 918df46 Compare October 19, 2015 05:48
expect(subject.method(:"xyz#{suffix}")).to_not be_nil
end
end
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is not material to the user, and it's not important who opened bugs. The issue is not the spec either, it's the behavior of Mash. Lets describe the code that is broken before and that works now in Ruby 2.2.3? Maybe something like:

Under Ruby 2.2.a the following code is broken: ..., Under Ruby 2.2.b the behavior is fixed and returns ... 
See [ruby-core#10985](https://bugs.ruby-lang.org/issues/10985) and [#...]() for details.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dblock As for the upgrading text...

TL:DR;

I think it is a crap spec. Unable to reproduce the supposedly faulty behavior on any of the pended Rubies.

Long Version:

I am having a terrible time understanding the issue. I am unable to reproduce the bug on Ruby 2.2.0 outside of the spec file, and the spec/hashie/mash_spec.rb run differently when running the whole suite (where it passes with on pending spec), versus running just the single file (where I get another failure in addition to the pending spec).

Ruby 2.0.0

ruby-2.0.0@foss
∴ irb
>> require "bundler/setup"
=> true
>> require "hashie"
=> true
>> a = Hashie::Mash.new
=> #<Hashie::Mash>
>> a.method(:"xyz=")
=> #<Method: Hashie::Mash#xyz=>

Ruby 2.1.7

ruby-2.1.7@foss
∴ irb
>> require "bundler/setup"
=> true
>> require "hashie"
=> true
>> a = Hashie::Mash.new
=> #<Hashie::Mash>
>> a.method(:"xyz=")
=> #<Method: Hashie::Mash#xyz=>

Ruby 2.2.0

ruby-2.2.0@foss
∴ irb
>> require "bundler/setup"
=> true
>> require "hashie"
=> true
>> a = Hashie::Mash.new(a: :b)
=> #<Hashie::Mash a=:b>
>> a.method(:"a=")
=> #<Method: Hashie::Mash#a=>
>> a.method(:"a=").nil?
=> false
>> a.method(:"xyz=").nil?
=> false
>> a.method(:"xyz?").nil?
=> false
>> a.method(:"xyz!").nil?
=> false
>> a.method(:"xyz_").nil?
=> false
>> a.method(:"xyz_").class
=> Method
>> a.method(:"xyz_")
=> #<Method: Hashie::Mash#xyz_>
>> RUBY_VERSION
=> "2.2.0"

I am going to just remove the upgrading text. I don't even understand the problem, so I really should be the one documenting it.

All this is doing is Upgrading travis. The spec itself is still pending for those older Rubies, and it is still "documented" there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fairly sure there's a way to reproduce this consistently, but I don't think it's that important.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dblock For clarity:
The pended one reproduces in the spec every time (which is why the pending works - it runs and fails). There was a second spec that doesn't reproduce every time, only when running the single file, but it isn't pended because it passes when running the whole suite (on every Ruby).

I just can't get the currently pended behavior to fail in irb at all when running Ruby 2.2.0, which is one of the pended Rubies that it does fail with in the spec.

…ingle file

- `travis.yml` add new Rubies to Build Matrix:
  - Update 2.2.2 to 2.2.3
  - Update 2.1.6 to 2.1.7
  - Add rbx-2.5.8
@pboling
Copy link
Contributor Author

pboling commented Oct 23, 2015

@dblock Squashed commits, this is ready.

@dblock
Copy link
Member

dblock commented Oct 23, 2015

So the Ruby bug is harder to reproduce and it's not as much strange as something that happens in very particular circumstance, in our case it manifests itself when running the spec standalone.

I think there's no need to add the comment that says "it's strange" - lets just move on :) I merged the travis-ci changes via ac68241 and left the rest alone.

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

Successfully merging this pull request may close these issues.

None yet

2 participants