Remove parser monkey patch

This commit is contained in:
Markus Schirp 2014-04-22 16:09:35 +00:00
parent 8f6c5ca5b4
commit 58db15c488
5 changed files with 4 additions and 38 deletions

View file

@ -1,10 +1,11 @@
# v0.5.11 2014-04-07
# v0.5.11 2014-04-xx
Changes:
* Fix crash on while and until without body
* Better require highjack based zombifier
* Do not mutate nthref $1 to gvar $0
* Use faster duplicate guarding hashing AST::Node intances
# v0.5.10 2014-04-06

View file

@ -3,6 +3,7 @@
source 'https://rubygems.org'
gem 'mutant', path: '.'
gem 'morpher', git: 'https://github.com/mbj/morpher'
gemspec name: 'mutant'

View file

@ -10,7 +10,6 @@ require 'equalizer'
require 'digest/sha1'
require 'inflecto'
require 'parser'
require 'parser_extensions'
require 'parser/current'
require 'unparser'
require 'ice_nine'

View file

@ -1,36 +0,0 @@
# Monkey patch to parser that needs to be pushed upstream
module Parser
# AST namespace
module AST
# The AST nodes we use in mutant
class Node
# Return hash compatible with #eql?
#
# @return [Fixnum]
#
# @api private
def hash
@type.hash ^ @children.hash ^ self.class.hash
end
# Test if node is equal to anotheo
#
# @return [true]
# if node represents the same code semantics locations are ignored
#
# @return [false]
# otherwise
#
# @api private
#
def eql?(other)
other.kind_of?(self.class)
other.type.eql?(@type) && other.children.eql?(@children)
end
end # Node
end # AST
end # Parser

View file

@ -24,6 +24,7 @@ Gem::Specification.new do |gem|
gem.required_ruby_version = '>= 1.9.3'
gem.add_runtime_dependency('parser', '~> 2.1')
gem.add_runtime_dependency('ast', '~> 2.0')
gem.add_runtime_dependency('diff-lcs', '~> 1.2')
gem.add_runtime_dependency('morpher', '~> 0.2.2')
gem.add_runtime_dependency('procto', '~> 0.0.2')