Commit 52c15f0
Use private_method_defined? instead of respond_to?
`Module.respond_to?(:ruby2_keywords, true)` does NOT check if
`Module#ruby2_keywords` is available. It worked well because there is
toplevel `ruby2_keywords` method, but using `private_method_defined?` is
better, I think.
Also, this fixes a syntactic error.1 parent 23981c5 commit 52c15f0
1 file changed
Lines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
32 | 29 | | |
33 | 30 | | |
34 | 31 | | |
0 commit comments