Closed sue445 closed 7 years ago
I inspected this probrem. It is caused by Refinements behavior. Current Refinements cannot refer to class variables.
class Foo
@@hoge = 1
@class_instance_var = 2
def hoge1
p @@hoge
end
def bar1
p self.class.instance_variable_get("@class_instance_var")
end
end
module Ext
refine Foo do
def hoge2
p @@hoge
end
def bar2
p self.class.instance_variable_get("@class_instance_var")
end
end
end
using Ext
Foo.new.bar1
Foo.new.bar2
Foo.new.hoge1
Foo.new.hoge2 # => NameError
I will submit bug ticket to bugs.ruby-lang.org
@joker1007 I see.
I think rspec-parameterized
should be locked with binding_ninja
v0.1.0. How do you think?
LGTM. Let's do so until I have fixed binding_ninja
I fixed binding_ninja and released v0.2.1
When using
binding_ninja
v0.2.0, rspec is failed π https://travis-ci.org/sue445/rspec-parameterized/builds/287121332But when downgrade
binding_ninja
to v0.1.0, rspec is successful πhttps://travis-ci.org/sue445/rspec-parameterized/builds/287123622
changes: https://github.com/sue445/rspec-parameterized/commit/dd6cb424cc16ea65d5b9aa23cce0ab116a7db65a
@joker1007 Can you fix this problem?