-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Description
activesupport を利用しているライブラリで rake test すると転けるようになってしまい、原因を追ったところ、次のコードで再現できるところまで絞れました。
gem "power_assert", "0.2.5"
gem "activesupport", "4.2.4"
require "power_assert"
require "active_support/core_ext/module/attribute_accessors"
require "active_support/configurable"
module M
mattr_reader :x
end
# ~> /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.4/lib/active_support/core_ext/module/attribute_accessors.rb:65:in `block in mattr_reader': protected method `[]' called for {}:Hash (NoMethodError)
# ~> from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.4/lib/active_support/core_ext/module/attribute_accessors.rb:55:in `each'
# ~> from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.4/lib/active_support/core_ext/module/attribute_accessors.rb:55:in `mattr_reader'
# ~> from -:9:in `<module:M>'
# ~> from -:8:in `<main>'わかっていること
- 0.2.4 だと動く
- require "active_support/configurable" を実行しないと動く
- power_assert を active_support/configurable 後に require すると動く
Metadata
Metadata
Assignees
Labels
No labels