aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/language/fixtures/for_scope.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/language/fixtures/for_scope.rb')
-rw-r--r--spec/ruby/language/fixtures/for_scope.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/ruby/language/fixtures/for_scope.rb b/spec/ruby/language/fixtures/for_scope.rb
new file mode 100644
index 0000000000..9c44a23a2c
--- /dev/null
+++ b/spec/ruby/language/fixtures/for_scope.rb
@@ -0,0 +1,15 @@
+module ForSpecs
+ class ForInClassMethod
+ m = :same_variable_set_outside
+
+ def self.foo
+ all = []
+ for m in [:bar, :baz]
+ all << m
+ end
+ all
+ end
+
+ READER = -> { m }
+ end
+end