Closed teoljungberg closed 10 years ago
My ruby version is 2.1.1
Without my changes
attr_extras master % irb
>> $-w = true
=> true
>> Dir["./spec/**/*_spec.rb"].each {|f| require f }
/Users/teo/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/attr_extras-2.2.1/lib/attr_extras.rb:37: warning: `*' interpreted as argument prefix
/Users/teo/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/attr_extras-2.2.1/lib/attr_extras.rb:42: warning: `*' interpreted as argument prefix
=> ["./spec/attr_extras_spec.rb", "./spec/attr_id_query_spec.rb", "./spec/attr_initialize_spec.rb", "./spec/attr_private_spec.rb", "./spec/attr_query_spec.rb", "./spec/attr_value_spec.rb", "./spec/method_object_spec.rb", "./spec/pattr_initialize_spec.rb", "./spec/vattr_initialize_spec.rb"]
>>
Run options: --seed 38552
# Running:
................E../Users/teo/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/attr_extras-2.2.1/lib/attr_extras.rb:13: warning: private attribute?
/Users/teo/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/attr_extras-2.2.1/lib/attr_extras.rb:13: warning: private attribute?
/Users/teo/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/attr_extras-2.2.1/lib/attr_extras.rb:13: warning: private attribute?
./Users/teo/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/attr_extras-2.2.1/lib/attr_extras.rb:13: warning: private attribute?
/Users/teo/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/attr_extras-2.2.1/lib/attr_extras.rb:13: warning: private attribute?
...
Fabulous run in 0.005404s, 4256.1066 runs/s, 8327.1651 assertions/s.
1) Error:
Object::.attr_value#test_0006_hashes objects the same if they have the same attributes:
NameError: uninitialized constant Set
/opt/attr_extras/spec/attr_value_spec.rb:96:in `block (2 levels) in <top (required)>'
23 runs, 45 assertions, 0 failures, 1 errors, 0 skips
So it's not a warning, fixing up my commit message with that
With my changes
attr_extras patch-1 % irb
>> $-w = true
=> true
>> Dir["./spec/**/*_spec.rb"].each {|f| require f }
/opt/attr_extras/lib/attr_extras.rb:37: warning: `*' interpreted as argument prefix
/opt/attr_extras/lib/attr_extras.rb:42: warning: `*' interpreted as argument prefix
=> ["./spec/attr_extras_spec.rb", "./spec/attr_id_query_spec.rb", "./spec/attr_initialize_spec.rb", "./spec/attr_private_spec.rb", "./spec/attr_query_spec.rb", "./spec/attr_value_spec.rb", "./spec/method_object_spec.rb", "./spec/pattr_initialize_spec.rb", "./spec/vattr_initialize_spec.rb"]
>>
Run options: --seed 22814
# Running:
.................../opt/attr_extras/lib/attr_extras.rb:13: warning: private attribute?
/opt/attr_extras/lib/attr_extras.rb:13: warning: private attribute?
./opt/attr_extras/lib/attr_extras.rb:13: warning: private attribute?
/opt/attr_extras/lib/attr_extras.rb:13: warning: private attribute?
/opt/attr_extras/lib/attr_extras.rb:13: warning: private attribute?
...
Fabulous run in 0.005192s, 4429.8921 runs/s, 9052.3883 assertions/s.
23 runs, 47 assertions, 0 failures, 0 errors, 0 skips
Oh yeah, you're right, the tests don't run on their own without that. I was a bit surprised that I didn't need to require "set"
. Thanks again!
Thanks! Exactly what warnings do you get with what version of Ruby running what command?
Without those changes:
With those changes: