Issue #9226 has been updated by tmm1 (Aman Gupta).


With r44059, I can reproduce this issue with the following ruby code. I confirmed RGENGC_CHECK=2 does not complain.

def create_oldgen_hash
  @h1 = {}
  GC.start
end

def replace_with_young_hash
  h2 = {"a"=>"b"}
  @h1.replace(h2)
  h2 = nil
end

create_oldgen_hash
replace_with_young_hash
GC.start(full_mark:false,immediate_sweep:false)
p @h1


----------------------------------------
Bug #9226: Getting method `inspect' called on unexpected T_NODE object (0x000000025ddea8 flags=0x109089c klass=0x0) (NotImplementedError) from Hash#inspect
https://bugs.ruby-lang.org/issues/9226#change-43566

Author: myronmarston (Myron Marston)
Status: Open
Priority: High
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: current: 2.1.0
ruby -v: 2.1.0.preview2
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


We're trying to get a green RSpec build against ruby 2.1.0.preview2, and we're getting this very odd failure on travis:

https://travis-ci.org/rspec/rspec-core/jobs/15066502#L122

The line where it's failing is here:

https://github.com/rspec/rspec-core/blob/2e77a83d92eb1e661398f00359fc784da019401a/lib/rspec/core/filter_manager.rb#L75

It's calling `inspect` on a Hash and blowing up with that confusing error.  The hash that's causing this failure (if that helps) is here:

https://github.com/rspec/rspec-core/blob/2e77a83d92eb1e661398f00359fc784da019401a/spec/spec_helper.rb#L149-L158

It's the `{ :ruby => lambda { } }` hash being passed to `filter_run_excluding`.


-- 
http://bugs.ruby-lang.org/