mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
ruby: remove unneeded parenthesis from methods
commit eeb33da43035b5400f8d1830ea52a68691b3a678
Author: John Bampton <jbampton@gmail.com>
Date: Mon Oct 31 23:53:43 2022 +1000
Fix up
commit 80923c8f92a58b2f33a36d6403de7f6341973110
Merge: bc89500f6 416f012f6
Author: John Bampton <jbampton@users.noreply.github.com>
Date: Mon Oct 31 20:12:59 2022 +1000
Merge branch 'master' into ruby-remove-parenthesis
commit bc89500f6357c453b457516452ffcc7fd03fee88
Author: John Bampton <jbampton@gmail.com>
Date: Mon Oct 31 14:39:20 2022 +1000
ruby: remove unneeded parenthesis from methods
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
NUM = 300
|
||||
SIZE = 10000
|
||||
|
||||
def test_lists()
|
||||
def test_lists
|
||||
# create a list of integers (Li1) from 1 to SIZE
|
||||
li1 = (1..SIZE).to_a
|
||||
# copy the list to li2 (not by individual items)
|
||||
|
||||
@@ -75,7 +75,7 @@ module MRuby
|
||||
def git?() return !!@repo; end
|
||||
def gemname() return File.basename(@gemdir); end
|
||||
|
||||
def hash()
|
||||
def hash
|
||||
return [@gemdir, @repo, @branch, @commit, @canonical, @path].hash
|
||||
end
|
||||
|
||||
|
||||
+2
-2
@@ -374,7 +374,7 @@ assert('BS Block [ruby-dev:31147]') do
|
||||
end
|
||||
|
||||
assert('BS Block [ruby-dev:31160]') do
|
||||
def m()
|
||||
def m
|
||||
yield
|
||||
end
|
||||
assert_nil m {|(v,(*))|}
|
||||
@@ -389,7 +389,7 @@ assert('BS Block [issue #750]') do
|
||||
end
|
||||
|
||||
assert('BS Block 31') do
|
||||
def m()
|
||||
def m
|
||||
yield
|
||||
end
|
||||
assert_nil m {|((*))|}
|
||||
|
||||
+2
-2
@@ -729,14 +729,14 @@ end
|
||||
|
||||
assert('Issue 1467') do
|
||||
module M1
|
||||
def initialize()
|
||||
def initialize
|
||||
super()
|
||||
end
|
||||
end
|
||||
|
||||
class C1
|
||||
include M1
|
||||
def initialize()
|
||||
def initialize
|
||||
super()
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user