在运行 RSpec 时,有时我会收到以下错误。只需保存文件即可运行 RSpec,有时它会消失。
[BUG] Segmentation fault
ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-darwin11.4.2]
-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0002 b:0002 l:000f38 d:000f38 TOP
* Loaded features:
0 enumerator.so
1 /Users/george/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/x86_64-darwin11.4.2/enc/encdb.bundle
2 /Users/george/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/x86_64-darwin11.4.2/enc/trans/transdb.bundle
3 /Users/george/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/rubygems/defaults.rb
4 /Users/george/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/x86_64-darwin11.4.2/rbconfig.rb
5 /Users/george/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/rubygems/deprecate.rb
6 /Users/george/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/rubygems/exceptions.rb
我的代码中的错误是NoMethodError: undefined method
.
为什么这会产生段错误错误?如何关闭详细的 473 行输出?