ruby-changes:59004
From: Benoit <ko1@a...>
Date: Sun, 1 Dec 2019 05:27:39 +0900 (JST)
Subject: [ruby-changes:59004] ab8345271e (master): Update to ruby/mspec@a401f63
https://git.ruby-lang.org/ruby.git/commit/?id=ab8345271e From ab8345271eb87ff155d8bd5f22f53a4cf2902c26 Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Sat, 30 Nov 2019 21:26:49 +0100 Subject: Update to ruby/mspec@a401f63 diff --git a/spec/mspec/lib/mspec/commands/mkspec.rb b/spec/mspec/lib/mspec/commands/mkspec.rb index 49a2e6b..d10cc35 100755 --- a/spec/mspec/lib/mspec/commands/mkspec.rb +++ b/spec/mspec/lib/mspec/commands/mkspec.rb @@ -19,7 +19,7 @@ class MkSpec https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/commands/mkspec.rb#L19 @map = NameMap.new true end - def options(argv=ARGV) + def options(argv = ARGV) options = MSpecOptions.new "mkspec [options]", 32 options.on("-c", "--constant", "CONSTANT", diff --git a/spec/mspec/lib/mspec/commands/mspec-ci.rb b/spec/mspec/lib/mspec/commands/mspec-ci.rb index 2882613..a31db1d 100644 --- a/spec/mspec/lib/mspec/commands/mspec-ci.rb +++ b/spec/mspec/lib/mspec/commands/mspec-ci.rb @@ -8,7 +8,7 @@ require 'mspec/utils/script' https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/commands/mspec-ci.rb#L8 class MSpecCI < MSpecScript - def options(argv=ARGV) + def options(argv = ARGV) options = MSpecOptions.new "mspec ci [options] (FILE|DIRECTORY|GLOB)+", 30, config options.doc " Ask yourself:" diff --git a/spec/mspec/lib/mspec/commands/mspec-run.rb b/spec/mspec/lib/mspec/commands/mspec-run.rb index 1e62bf2..4d8f4d9 100644 --- a/spec/mspec/lib/mspec/commands/mspec-run.rb +++ b/spec/mspec/lib/mspec/commands/mspec-run.rb @@ -14,7 +14,7 @@ class MSpecRun < MSpecScript https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/commands/mspec-run.rb#L14 config[:files] = [] end - def options(argv=ARGV) + def options(argv = ARGV) options = MSpecOptions.new "mspec run [options] (FILE|DIRECTORY|GLOB)+", 30, config options.doc " Ask yourself:" diff --git a/spec/mspec/lib/mspec/commands/mspec-tag.rb b/spec/mspec/lib/mspec/commands/mspec-tag.rb index f5d8502..e1d04d1 100644 --- a/spec/mspec/lib/mspec/commands/mspec-tag.rb +++ b/spec/mspec/lib/mspec/commands/mspec-tag.rb @@ -15,7 +15,7 @@ class MSpecTag < MSpecScript https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/commands/mspec-tag.rb#L15 config[:ltags] = [] end - def options(argv=ARGV) + def options(argv = ARGV) options = MSpecOptions.new "mspec tag [options] (FILE|DIRECTORY|GLOB)+", 30, config options.doc " Ask yourself:" diff --git a/spec/mspec/lib/mspec/commands/mspec.rb b/spec/mspec/lib/mspec/commands/mspec.rb index f6caf93..9d82949 100755 --- a/spec/mspec/lib/mspec/commands/mspec.rb +++ b/spec/mspec/lib/mspec/commands/mspec.rb @@ -21,7 +21,7 @@ class MSpecMain < MSpecScript https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/commands/mspec.rb#L21 config[:launch] = [] end - def options(argv=ARGV) + def options(argv = ARGV) config[:command] = argv.shift if ["ci", "run", "tag"].include?(argv[0]) options = MSpecOptions.new "mspec [COMMAND] [options] (FILE|DIRECTORY|GLOB)+", 30, config diff --git a/spec/mspec/lib/mspec/helpers/datetime.rb b/spec/mspec/lib/mspec/helpers/datetime.rb index 1520b97..3a40cc0 100644 --- a/spec/mspec/lib/mspec/helpers/datetime.rb +++ b/spec/mspec/lib/mspec/helpers/datetime.rb @@ -6,7 +6,7 @@ https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/helpers/datetime.rb#L6 # # Possible keys are: # :year, :month, :day, :hour, :minute, :second, :offset and :sg. -def new_datetime(opts={}) +def new_datetime(opts = {}) require 'date' value = { diff --git a/spec/mspec/lib/mspec/helpers/flunk.rb b/spec/mspec/lib/mspec/helpers/flunk.rb index 68fb3ca..84fb3ab 100644 --- a/spec/mspec/lib/mspec/helpers/flunk.rb +++ b/spec/mspec/lib/mspec/helpers/flunk.rb @@ -1,3 +1,3 @@ https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/helpers/flunk.rb#L1 -def flunk(msg="This example is a failure") +def flunk(msg = "This example is a failure") SpecExpectation.fail_with "Failed:", msg end diff --git a/spec/mspec/lib/mspec/helpers/fs.rb b/spec/mspec/lib/mspec/helpers/fs.rb index 26dd821..67453eb 100644 --- a/spec/mspec/lib/mspec/helpers/fs.rb +++ b/spec/mspec/lib/mspec/helpers/fs.rb @@ -55,7 +55,7 @@ end https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/helpers/fs.rb#L55 # Creates a file +name+. Creates the directory for +name+ # if it does not exist. -def touch(name, mode="w") +def touch(name, mode = "w") mkdir_p File.dirname(name) File.open(name, mode) do |f| diff --git a/spec/mspec/lib/mspec/helpers/io.rb b/spec/mspec/lib/mspec/helpers/io.rb index d12d4b6..1938255 100644 --- a/spec/mspec/lib/mspec/helpers/io.rb +++ b/spec/mspec/lib/mspec/helpers/io.rb @@ -64,7 +64,7 @@ end https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/helpers/io.rb#L64 # Creates a "bare" file descriptor (i.e. one that is not associated # with any Ruby object). The file descriptor can safely be passed # to IO.new without creating a Ruby object alias to the fd. -def new_fd(name, mode="w:utf-8") +def new_fd(name, mode = "w:utf-8") if mode.kind_of? Hash if mode.key? :mode mode = mode[:mode] diff --git a/spec/mspec/lib/mspec/helpers/numeric.rb b/spec/mspec/lib/mspec/helpers/numeric.rb index 312aafa..c6c2e82 100644 --- a/spec/mspec/lib/mspec/helpers/numeric.rb +++ b/spec/mspec/lib/mspec/helpers/numeric.rb @@ -8,7 +8,7 @@ def infinity_value https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/helpers/numeric.rb#L8 1/0.0 end -def bignum_value(plus=0) +def bignum_value(plus = 0) 0x8000_0000_0000_0000 + plus end diff --git a/spec/mspec/lib/mspec/helpers/tmp.rb b/spec/mspec/lib/mspec/helpers/tmp.rb index 4e1273d..1677fb4 100644 --- a/spec/mspec/lib/mspec/helpers/tmp.rb +++ b/spec/mspec/lib/mspec/helpers/tmp.rb @@ -30,7 +30,7 @@ all specs are cleaning up temporary files: https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/helpers/tmp.rb#L30 end end -def tmp(name, uniquify=true) +def tmp(name, uniquify = true) Dir.mkdir SPEC_TEMP_DIR unless Dir.exist? SPEC_TEMP_DIR if uniquify and !name.empty? diff --git a/spec/mspec/lib/mspec/matchers/have_instance_method.rb b/spec/mspec/lib/mspec/matchers/have_instance_method.rb index 636aaf3..9a5a31a 100644 --- a/spec/mspec/lib/mspec/matchers/have_instance_method.rb +++ b/spec/mspec/lib/mspec/matchers/have_instance_method.rb @@ -18,7 +18,7 @@ class HaveInstanceMethodMatcher < MethodMatcher https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/matchers/have_instance_method.rb#L18 end module MSpecMatchers - private def have_instance_method(method, include_super=true) + private def have_instance_method(method, include_super = true) HaveInstanceMethodMatcher.new method, include_super end end diff --git a/spec/mspec/lib/mspec/matchers/have_method.rb b/spec/mspec/lib/mspec/matchers/have_method.rb index 35dae03..e962e69 100644 --- a/spec/mspec/lib/mspec/matchers/have_method.rb +++ b/spec/mspec/lib/mspec/matchers/have_method.rb @@ -18,7 +18,7 @@ class HaveMethodMatcher < MethodMatcher https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/matchers/have_method.rb#L18 end module MSpecMatchers - private def have_method(method, include_super=true) + private def have_method(method, include_super = true) HaveMethodMatcher.new method, include_super end end diff --git a/spec/mspec/lib/mspec/matchers/have_private_instance_method.rb b/spec/mspec/lib/mspec/matchers/have_private_instance_method.rb index 4eb7133..d32db76 100644 --- a/spec/mspec/lib/mspec/matchers/have_private_instance_method.rb +++ b/spec/mspec/lib/mspec/matchers/have_private_instance_method.rb @@ -18,7 +18,7 @@ class HavePrivateInstanceMethodMatcher < MethodMatcher https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/matchers/have_private_instance_method.rb#L18 end module MSpecMatchers - private def have_private_instance_method(method, include_super=true) + private def have_private_instance_method(method, include_super = true) HavePrivateInstanceMethodMatcher.new method, include_super end end diff --git a/spec/mspec/lib/mspec/matchers/have_private_method.rb b/spec/mspec/lib/mspec/matchers/have_private_method.rb index 3433d98..c74165c 100644 --- a/spec/mspec/lib/mspec/matchers/have_private_method.rb +++ b/spec/mspec/lib/mspec/matchers/have_private_method.rb @@ -18,7 +18,7 @@ class HavePrivateMethodMatcher < MethodMatcher https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/matchers/have_private_method.rb#L18 end module MSpecMatchers - private def have_private_method(method, include_super=true) + private def have_private_method(method, include_super = true) HavePrivateMethodMatcher.new method, include_super end end diff --git a/spec/mspec/lib/mspec/matchers/have_protected_instance_method.rb b/spec/mspec/lib/mspec/matchers/have_protected_instance_method.rb index 641d4d0..1deb2f9 100644 --- a/spec/mspec/lib/mspec/matchers/have_protected_instance_method.rb +++ b/spec/mspec/lib/mspec/matchers/have_protected_instance_method.rb @@ -18,7 +18,7 @@ class HaveProtectedInstanceMethodMatcher < MethodMatcher https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/matchers/have_protected_instance_method.rb#L18 end module MSpecMatchers - private def have_protected_instance_method(method, include_super=true) + private def have_protected_instance_method(method, include_super = true) HaveProtectedInstanceMethodMatcher.new method, include_super end end diff --git a/spec/mspec/lib/mspec/matchers/have_public_instance_method.rb b/spec/mspec/lib/mspec/matchers/have_public_instance_method.rb index 501c0a4..0e62053 100644 --- a/spec/mspec/lib/mspec/matchers/have_public_instance_method.rb +++ b/spec/mspec/lib/mspec/matchers/have_public_instance_method.rb @@ -18,7 +18,7 @@ class HavePublicInstanceMethodMatcher < MethodMatcher https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/matchers/have_public_instance_method.rb#L18 end module MSpecMatchers - (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/