Skip to content

Commit

Permalink
Change required Ruby version to >=2.3
Browse files Browse the repository at this point in the history
* This commit does every 2.3 change required to get the build pass
* None of the changes can be extracted, without changing the build setup
  • Loading branch information
mbj committed Sep 12, 2018
1 parent b007f3c commit 99ab9ff
Show file tree
Hide file tree
Showing 363 changed files with 384 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ AllCops:
- 'test_app/**/*'
- 'tmp/**/*'
- 'vendor/**/*'
TargetRubyVersion: 2.2
TargetRubyVersion: 2.3
5 changes: 5 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v0.8.17 2018-09-12

* Drop support for Ruby < 2.3
* Use frozen string literals globally

# v0.8.16 2018-08-03

* Support for rspec-3.x
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
source 'https://rubygems.org'

gemspec name: 'mutant'
Expand Down
16 changes: 8 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
mutant (0.8.14)
mutant (0.8.16)
abstract_type (~> 0.0.7)
adamantium (~> 0.2.0)
anima (~> 0.3.0)
Expand All @@ -17,9 +17,9 @@ PATH
procto (~> 0.0.2)
regexp_parser (~> 0.4.9)
unparser (~> 0.2.5)
mutant-rspec (0.8.14)
mutant (~> 0.8.14)
rspec-core (>= 3.4.0, < 3.8.0)
mutant-rspec (0.8.16)
mutant (~> 0.8.16)
rspec-core (>= 3.4.0, < 4.0.0)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -105,7 +105,7 @@ GEM
codeclimate-engine-rb (~> 0.4.0)
parser (>= 2.4.0.0, < 2.5)
rainbow (~> 2.0)
regexp_parser (0.4.9)
regexp_parser (0.4.13)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
Expand Down Expand Up @@ -139,13 +139,13 @@ GEM
simplecov-html (0.10.1)
thread_safe (0.3.6)
unicode-display_width (1.3.0)
unparser (0.2.6)
unparser (0.2.8)
abstract_type (~> 0.0.7)
adamantium (~> 0.2.0)
concord (~> 0.1.5)
diff-lcs (~> 1.3)
equalizer (~> 0.0.9)
parser (>= 2.3.1.2, < 2.5)
parser (>= 2.3.1.2, < 2.6)
procto (~> 0.0.2)
virtus (1.0.5)
axiom-types (~> 0.1)
Expand All @@ -166,4 +166,4 @@ DEPENDENCIES
mutant!

BUNDLED WITH
1.15.4
1.16.4
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'devtools'

Devtools.init_rake_tasks
Expand Down
1 change: 1 addition & 0 deletions bin/mutant
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

trap('INT') do |status|
effective_status = status ? status + 128 : 128
Expand Down
2 changes: 1 addition & 1 deletion config/flay.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
threshold: 16
total_score: 1316
total_score: 1318
1 change: 1 addition & 0 deletions lib/mutant.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'abstract_type'
require 'adamantium'
require 'anima'
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/actor.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
# A minimal actor implementation
module Actor
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/actor/env.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module Actor
# Actor root environment
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/actor/mailbox.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module Actor
# Unbound mailbox
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/actor/receiver.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module Actor
# Receiver side of an actor
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/actor/sender.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module Actor

Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
# AST helpers
module AST
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/meta.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
# Node meta information mixin
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/meta/const.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
# Node meta information mixin
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/meta/optarg.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
# Node meta information mixin
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/meta/resbody.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
# Node meta information mixin
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/meta/restarg.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
# Node meta information mixin
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/meta/send.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
# Node meta information mixin
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/meta/symbol.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
# Node meta information mixin
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/named_children.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST

Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/node_predicates.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
# Module for node predicates
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/nodes.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
# Singleton nodes
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/regexp.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
# Regexp source mapper
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/regexp/transformer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
module Regexp
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/regexp/transformer/alternative.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
module Regexp
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/regexp/transformer/character_set.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
module Regexp
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/regexp/transformer/direct.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
module Regexp
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/regexp/transformer/options_group.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
module Regexp
Expand Down
3 changes: 2 additions & 1 deletion lib/mutant/ast/regexp/transformer/quantifier.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
module Regexp
Expand Down Expand Up @@ -99,7 +100,7 @@ def quantifier
#
# @return [String]
def interval_text
interval = [min, max].map { |num| num if num > 0 }.uniq
interval = [min, max].map { |num| num if num.positive? }.uniq
"{#{interval.join(',')}}"
end
end # ASTToExpression
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/regexp/transformer/recursive.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
module Regexp
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/regexp/transformer/root.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
module Regexp
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/regexp/transformer/text.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
module Regexp
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/sexp.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
# Mixin for node sexp syntax
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/ast/types.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
module AST
# Groups of node types
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/cli.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
# Commandline parser / runner
class CLI
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/color.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
# Class to colorize strings
class Color
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/config.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
# Standalone configuration of a mutant execution.
#
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/context.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
# An abstract context where mutations can be applied to.
class Context
Expand Down
5 changes: 3 additions & 2 deletions lib/mutant/diff.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
# Class to create diffs from source code
class Diff
Expand All @@ -17,7 +18,7 @@ class Diff
def diff
return if diffs.empty?

minimized_hunk.diff(:unified) << NEWLINE
minimized_hunk.diff(:unified) + NEWLINE
end
memoize :diff

Expand Down Expand Up @@ -68,7 +69,7 @@ def diffs
# @return [Array<Diff::LCS::Hunk>]
def hunks
diffs.map do |diff|
::Diff::LCS::Hunk.new(old, new, diff, max_length, 0)
::Diff::LCS::Hunk.new(old.map(&:dup), new, diff, max_length, 0)
end
end

Expand Down
1 change: 1 addition & 0 deletions lib/mutant/env.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
# Abstract base class for mutant environments
class Env
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/env/bootstrap.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Env
# Bootstrap environment
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/expression.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant

# Abstract base class for match expression
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/expression/method.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Expression

Expand Down
1 change: 1 addition & 0 deletions lib/mutant/expression/methods.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Expression

Expand Down
1 change: 1 addition & 0 deletions lib/mutant/expression/namespace.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Expression
# Abstract base class for expressions matching namespaces
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/expression/parser.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Expression
class Parser
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/integration.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant

# Abstract base class mutant test framework integrations
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/integration/rspec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'rspec/core'

module Mutant
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/isolation.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Isolation
include AbstractType
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/isolation/fork.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Isolation
# Isolation via the fork(2) systemcall.
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/isolation/none.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
# Module providing isolation
class Isolation
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/loader.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
# Base class for code loaders
class Loader
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/matcher.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
# Abstract matcher to find subjects to mutate
class Matcher
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/matcher/chain.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Matcher
# Matcher chaining results of other matchers together
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/matcher/compiler.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Matcher

Expand Down
1 change: 1 addition & 0 deletions lib/mutant/matcher/config.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Matcher
# Subject matcher configuration
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/matcher/filter.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Matcher
# Matcher filter
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/matcher/method.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Matcher
# Abstract base class for method matchers
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/matcher/method/instance.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Matcher
class Method
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/matcher/method/singleton.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Matcher
class Method
Expand Down
1 change: 1 addition & 0 deletions lib/mutant/matcher/methods.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Mutant
class Matcher
# Abstract base class for matcher that returns method subjects from scope
Expand Down
Loading

0 comments on commit 99ab9ff

Please sign in to comment.