Skip to content

Commit

Permalink
Ruby 1.9.1 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Nov 7, 2009
1 parent 0176cbe commit e771e74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pickle/parser/matchers.rb
Expand Up @@ -58,13 +58,13 @@ def match_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
Expand Down

0 comments on commit e771e74

Please sign in to comment.