./lib/coderay/scanners/ruby.rb in coderay-0.5.0.100 vs ./lib/coderay/scanners/ruby.rb in coderay-0.5.0.115

- old
+ new

@@ -132,22 +132,22 @@ when ?$, ?@ tokens << [match, :escape] last_state = state # scan one token as normal code, then return here state = :initial else - raise 'else-case # reached; #%p not handled' % peek(1), tokens + raise_inspect 'else-case # reached; #%p not handled' % peek(1), tokens end when state.paren state.paren_depth += 1 tokens << [match, :nesting_delimiter] when REGEXP_SYMBOLS tokens << [match, :function] else - raise 'else-case " reached; %p not handled, state = %p' % [match, state], tokens + raise_inspect 'else-case " reached; %p not handled, state = %p' % [match, state], tokens end next # }}} else @@ -176,11 +176,11 @@ end when ?#, ?=, ?_ type = :comment regexp_allowed = true else - raise 'else-case _ reached, because case %p was not handled' % [matched[0].chr], tokens + raise_inspect 'else-case _ reached, because case %p was not handled' % [matched[0].chr], tokens end tokens << [match, type] next elsif state == :initial @@ -272,10 +272,10 @@ heredocs ||= [] # create heredocs if empty heredocs << heredoc elsif fancy_allowed and match = scan(/#{FANCY_START}/o) type, interpreted = *FancyStringType.fetch(self[1]) do - raise 'Unknown fancy string: %%%p' % k, tokens + raise_inspect 'Unknown fancy string: %%%p' % k, tokens end tokens << [:open, type] state = StringState.new type, interpreted, self[2] type = :delimiter