From 5db552b2007967faed810a01189fad4291071c5e Mon Sep 17 00:00:00 2001 From: Marc Siegel Date: Thu, 25 Jul 2013 11:29:34 -0400 Subject: [PATCH] add test of earlier fix for FCB#instance_variables type on 1.8.x --- spec/docile_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spec/docile_spec.rb b/spec/docile_spec.rb index c518250..0ad2c21 100644 --- a/spec/docile_spec.rb +++ b/spec/docile_spec.rb @@ -217,4 +217,18 @@ describe Docile do end + context "FallbackContextProxy#instance_variables" do + + it "should preserve the class (String or Symbol) normally returned by current ruby version" do + @a = 1 + expected_type = instance_variables.first.class + + fcp = Docile::FallbackContextProxy.new(nil, nil) + fcp.instance_variable_set(:@foo, "foo") + + fcp.instance_variables.first.class.should == expected_type + end + + end + end