Project

General

Profile

Actions

Bug #9109

closed

extend したモジュールメソッドと RSpec の let で 2 つ同名を使ったときに segmentation fault になる

Added by sunaot (sunao tanabe) over 10 years ago. Updated over 4 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin11.4.2]
Backport:
[ruby-dev:47804]

Description

=begin

以下のコードで segmentation fault を起こします。

require 'rspec'

module ExtendModule
def foo
'foo'
end

def bar
'bar'
end
end

describe 'foo' do
extend ExtendModule
let(:foo) { foo }
let(:bar) { bar }
it { foo.should be 'foo' }
it { bar.should be 'bar' }
end

実行結果

$ bundle exec rspec
FSegmentation fault: 11

RSpec version 2.14.7 (現時点の最新安定板)

期待する挙動

segmentation fault せず SystemStackError となる (同名が 1 つの場合の挙動から推測)

=end


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Bug #9900: Segmentation fault with recursive reference of a hashClosed06/04/2014Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0