lib/pickle/parser/matchers.rb in pickle-0.1.21 vs lib/pickle/parser/matchers.rb in pickle-0.1.22
- old
+ new
@@ -56,16 +56,16 @@
def match_model
"(?:#{match_mapping}|#{match_prefix}?(?:#{match_indexed_model}|#{match_labeled_model}))"
end
def match_predicate
- "(?:#{config.predicates.map{|m| m.sub(/\?$/,'').gsub('_','[_ ]')}.join('|')})"
+ "(?:#{config.predicates.map{|m| m.to_s.sub(/\?$/,'').gsub('_','[_ ]')}.join('|')})"
end
# create capture analogues of match methods
instance_methods.select{|m| m =~ /^match_/}.each do |method|
eval <<-end_eval
- def #{method.sub('match_', 'capture_')} # def capture_field
+ def #{method.to_s.sub('match_', 'capture_')} # def capture_field
"(" + #{method} + ")" # "(" + match_field + ")"
end # end
end_eval
end
\ No newline at end of file