From: Petr Kovar Date: 2010-04-15T23:52:23+09:00 Subject: [ruby-core:29533] [Bug #3152] StringScanner is failing with symbols like # or { Bug #3152: StringScanner is failing with symbols like # or { http://redmine.ruby-lang.org/issues/show/3152 Author: Petr Kovar Status: Open, Priority: Normal ruby -v: all versions StringScanner has problems with symbols like # or { in the middle of a text. If a string starts with the symbols, it's ok. Function scan_until, however, works well. Problematic functions are scan and scan_full. Example: require 'strscan' s1 = StringScanner.new('#{expr} blah blah') s2 = StringScanner.new('blah blah #{expr} blah blah') reg = /#\{/ puts "s1 failed" unless s1.scan(reg) # should be ok puts "s2 failed" unless s2.scan(reg) # is failing ---------------------------------------- http://redmine.ruby-lang.org