mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
wrap method arguments by parentheses as convention
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user