wrap method arguments by parentheses as convention

This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-01-30 19:36:27 +09:00
parent caac15e8e1
commit ecd2d8c11e
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ class Integer
# Calls the given block +self+ times.
#
# ISO 15.2.8.3.22
def times &block
def times(&block)
return to_enum :times unless block
i = 0
+1 -1
View File
@@ -313,7 +313,7 @@ assert('BS Block 25') do
end
assert('BS Block 26') do
def m a
def m(a)
yield a
end
assert_equal(2) do
+1 -1
View File
@@ -40,7 +40,7 @@ assert('Class#new', '15.2.3.3.3') do
end
class TestClass
def initialize args, &block
def initialize(args, &block)
@result = if not args.nil? and block.nil?
# only arguments
:only_args
+1 -1
View File
@@ -216,7 +216,7 @@ assert('Float#truncate', '15.2.9.3.15') do
end
assert('Float#divmod') do
def check_floats exp, act
def check_floats(exp, act)
assert_float exp[0], act[0]
assert_float exp[1], act[1]
end