From 24381952896ac9ff57ba379732c7962a886d0627 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Tue, 1 Nov 2022 00:22:43 +1000 Subject: [PATCH] ruby: remove unneeded parenthesis from methods commit eeb33da43035b5400f8d1830ea52a68691b3a678 Author: John Bampton Date: Mon Oct 31 23:53:43 2022 +1000 Fix up commit 80923c8f92a58b2f33a36d6403de7f6341973110 Merge: bc89500f6 416f012f6 Author: John Bampton Date: Mon Oct 31 20:12:59 2022 +1000 Merge branch 'master' into ruby-remove-parenthesis commit bc89500f6357c453b457516452ffcc7fd03fee88 Author: John Bampton Date: Mon Oct 31 14:39:20 2022 +1000 ruby: remove unneeded parenthesis from methods --- benchmark/bm_so_lists.rb | 2 +- lib/mruby/build/load_gems.rb | 2 +- test/t/bs_block.rb | 4 ++-- test/t/module.rb | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/benchmark/bm_so_lists.rb b/benchmark/bm_so_lists.rb index f620297f4..3b9f291b8 100644 --- a/benchmark/bm_so_lists.rb +++ b/benchmark/bm_so_lists.rb @@ -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) diff --git a/lib/mruby/build/load_gems.rb b/lib/mruby/build/load_gems.rb index 4142881ab..34d35ebdd 100644 --- a/lib/mruby/build/load_gems.rb +++ b/lib/mruby/build/load_gems.rb @@ -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 diff --git a/test/t/bs_block.rb b/test/t/bs_block.rb index f4e4da375..c37d1b538 100644 --- a/test/t/bs_block.rb +++ b/test/t/bs_block.rb @@ -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 {|((*))|} diff --git a/test/t/module.rb b/test/t/module.rb index 8179ac78d..c18276a9f 100644 --- a/test/t/module.rb +++ b/test/t/module.rb @@ -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