From ceadcc44141f598532bff6c6f6c5cf90135b1f87 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 3 Oct 2006 15:59:45 +0000 Subject: * parse.y (block_param): restrict block parameters to be local variables only. * test/ruby/test_iterator.rb (TestIterator::test_nested_iterator): update test suite to conform the last change. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/scanf.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/scanf.rb b/lib/scanf.rb index 3d56e4aab..87b7e98ee 100644 --- a/lib/scanf.rb +++ b/lib/scanf.rb @@ -542,7 +542,8 @@ module Scanf @string_left = str @matched_count = 0 - @specs.each_with_index do |spec,@i| + @specs.each_with_index do |spec,i| + @i=i @last_spec_tried = spec @last_match_tried = spec.match(@string_left) break unless @last_match_tried -- cgit