diff --git a/lib/erb.rb b/lib/erb.rb index 3ff64cbb3d..b1c993c001 100644 --- a/lib/erb.rb +++ b/lib/erb.rb @@ -501,6 +501,8 @@ class ERB begin require 'strscan' + rescue LoadError + else class SimpleScanner < Scanner # :nodoc: def scan stag_reg = /(.*?)(#{stags.join('|')}|\z)/m @@ -540,8 +542,6 @@ class ERB end end Scanner.regist_scanner(ExplicitScanner, '-', false) - - rescue LoadError end class Buffer # :nodoc: