Skip to content

Commit d5d8c0c

Browse files
committed
Check Module#ruby2_keywords arity
It is considered a mistake, because calling this method with no arguments has no effect.
1 parent 9cf7c97 commit d5d8c0c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/ruby2_keywords.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
class Module
22
unless respond_to?(:ruby2_keywords, true)
33
private
4-
def ruby2_keywords(*)
4+
def ruby2_keywords(name, *)
55
# nil
66
end
77
end
88
end
99

1010
main = TOPLEVEL_BINDING.receiver
1111
unless main.respond_to?(:ruby2_keywords, true)
12-
def main.ruby2_keywords(*)
12+
def main.ruby2_keywords(name, *)
1313
# nil
1414
end
1515
end

0 commit comments

Comments
 (0)