Skip to content

Commit 07e126e

Browse files
mamenobu
authored andcommitted
Add a guard for Proc#ruby2_keywords
1 parent ff392be commit 07e126e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/ruby2_keywords.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ def main.ruby2_keywords(name, *)
1515
end
1616

1717
class Proc
18-
def ruby2_keywords
19-
self
18+
unless method_defined?(:ruby2_keywords)
19+
def ruby2_keywords
20+
self
21+
end
2022
end
2123
end

0 commit comments

Comments
 (0)