Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

. rbx doesn't like the new formatting, reverting to the old one

  • Loading branch information...
commit c0a680eb6be7398033beda237d83be03c7f6bd21 1 parent 99c3528
@kschiess authored
Showing with 15 additions and 10 deletions.
  1. +15 −10 lib/parslet/rig/rspec.rb
View
25 lib/parslet/rig/rspec.rb
@@ -2,8 +2,9 @@
match do |parser|
begin
@result = parser.parse(input)
- @block ? @block.call(@result)
- : (@as == @result || @as.nil?)
+ @block ?
+ @block.call(@result) :
+ (@as == @result || @as.nil?)
rescue Parslet::ParseFailed
@trace = parser.error_tree.ascii_tree if opts && opts[:trace]
false
@@ -16,11 +17,13 @@
" with #{is.inspect} to meet block conditions, but it didn't"
else
"expected " <<
- (@as ? "output of parsing #{input.inspect}"<<
- " with #{is.inspect} to equal #{@as.inspect}, but was #{@result.inspect}"
- : "#{is.inspect} to be able to parse #{input.inspect}") <<
- (@trace ? "\n"+@trace
- : '')
+ (@as ?
+ "output of parsing #{input.inspect}"<<
+ " with #{is.inspect} to equal #{@as.inspect}, but was #{@result.inspect}" :
+ "#{is.inspect} to be able to parse #{input.inspect}") <<
+ (@trace ?
+ "\n"+@trace :
+ '')
end
end
@@ -29,9 +32,11 @@
"expected output of parsing #{input.inspect} with #{is.inspect} not to meet block conditions, but it did"
else
"expected " <<
- (@as ? "output of parsing #{input.inspect}"<<
- " with #{is.inspect} not to equal #{@as.inspect}"
- : "#{is.inspect} to not parse #{input.inspect}, but it did")
+ (@as ?
+ "output of parsing #{input.inspect}"<<
+ " with #{is.inspect} not to equal #{@as.inspect}" :
+
+ "#{is.inspect} to not parse #{input.inspect}, but it did")
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.