Bug #11656
closedruby crashes when running rspec from top level context, but not from the individual spec that is causing ruby to crash
Description
/Users/dgreenbe77/Development/frederick_gem/lib/frederick/models/model.rb
./spec/lib/frederick/models/model_spec.rb
Files
Updated by dgreenbe77 (Daniel Greenberg) over 8 years ago
- File model.rb model.rb added
- File model_spec.rb model_spec.rb added
- ruby -v set to ruby-2.2.3
Attached file here because it is hard to read above.
Updated by dgreenbe77 (Daniel Greenberg) over 8 years ago
Daniel Greenberg wrote:
Attached file here because it is hard to read above.
describe '#hash' do
let(:attr_vals) { subject.attr_values.to_s }
before { expect(Digest::MD5).to receive(:hexdigest).with(attr_vals).and_call_original }
it 'returns the stringified hash code of the instance values, code is the same over new instances of ruby' do
expect(subject.hash).to eq hash_code
end
end
found when i renamed attr_values let to not be existing method name that the interpreter stopped crashing
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
- File bug-11656.log bug-11656.log added
- Description updated (diff)
- Assignee set to ko1 (Koichi Sasada)
What does let
do?
Updated by austin (Austin Ziegler) over 8 years ago
It creates a memoized function of the symbol name containing the value.
On Thu, Nov 5, 2015 at 12:23 AM, nobu@ruby-lang.org wrote:
Issue #11656 has been updated by Nobuyoshi Nakada.
File bug-11656.log added
Description updated
Assignee set to Koichi SasadaWhat does
let
do?
Bug #11656: ruby crashes when running rspec from top level context, but
not from the individual spec that is causing ruby to crash
https://bugs.ruby-lang.org/issues/11656#change-54715
- Author: Daniel Greenberg
- Status: Open
- Priority: Normal
- Assignee: Koichi Sasada
- ruby -v: ruby-2.2.3
- Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
/Users/dgreenbe77/Development/frederick_gem/lib/frederick/models/model.rb
./spec/lib/frederick/models/model_spec.rb---Files--------------------------------
model.rb (3.18 KB)
model_spec.rb (4.2 KB)
bug-11656.log (74.5 KB)
--
Austin Ziegler • halostatue@gmail.com • austin@halostatue.ca
http://www.halostatue.ca/ • http://twitter.com/halostatue
Updated by ko1 (Koichi Sasada) over 8 years ago
could you try latest ruby 2.3dev?
or could you tell me how to run it?
Updated by ko1 (Koichi Sasada) about 7 years ago
- Status changed from Open to Closed
No feedback. Please reopen this ticket if you have this trouble on recent versions.