Cleanup mutator internals
* Rename emit_safe to emit * Rename emit_unsafe to emit!
This commit is contained in:
parent
3cdd3091bf
commit
76199d082b
7 changed files with 8 additions and 7 deletions
|
@ -72,7 +72,7 @@ module Mutant
|
|||
mutant.privately = true
|
||||
# TODO: Fix rubinius to allow this as an attr_accessor
|
||||
mutant.instance_variable_set(:@vcall_style,true)
|
||||
emit_safe(mutant)
|
||||
emit(mutant)
|
||||
end
|
||||
|
||||
# Emit mutations
|
||||
|
|
|
@ -14,7 +14,7 @@ module Mutant
|
|||
#
|
||||
def dispatch
|
||||
emit_nil
|
||||
emit_safe(inverse)
|
||||
emit(inverse)
|
||||
end
|
||||
|
||||
# Return inverse
|
||||
|
|
|
@ -16,7 +16,7 @@ module Mutant
|
|||
#
|
||||
def dispatch
|
||||
emit_nil
|
||||
emit(Rubinius::AST::ArrayLiteral, [new_nil])
|
||||
emit_node(Rubinius::AST::ArrayLiteral, [new_nil])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -27,7 +27,7 @@ module Mutant
|
|||
#
|
||||
def emit_special_cases
|
||||
[infinity, negative_infinity, nan].each do |value|
|
||||
emit_safe(value)
|
||||
emit(value)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ module Mutant
|
|||
#
|
||||
def dispatch
|
||||
emit_nil
|
||||
emit_safe(inverse)
|
||||
emit(inverse)
|
||||
emit_range
|
||||
end
|
||||
|
||||
|
|
|
@ -113,6 +113,7 @@ module Mutant
|
|||
# @api private
|
||||
#
|
||||
def dup_when_branches
|
||||
|
||||
when_branches.dup
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Mutant::Mutator, '#emit_safe' do
|
||||
subject { object.send(:emit_safe, node) }
|
||||
describe Mutant::Mutator, '#emit' do
|
||||
subject { object.send(:emit, node) }
|
||||
|
||||
class Block
|
||||
attr_reader :arguments
|
Loading…
Add table
Reference in a new issue