Project

General

Profile

Bug #10460 ยป rspec_ruby_segfault.rb

RSpec segfault example - Ajedi32 (Andrew M), 11/26/2014 10:29 PM

 
1
require 'ostruct'
2

    
3
describe "Ruby Segfault" do
4
  let(:obj1) { OpenStruct.new(prop: obj2) }
5

    
6
  describe "asdf" do
7
    let(:obj2) { obj1 }
8

    
9
    it "shouldn't produce a segfault, but it does (sometimes)" do
10
      obj2
11
    end
12
  end
13
end