|
27 | 27 | RUBY |
28 | 28 | end |
29 | 29 | else |
30 | | - # FIXME: `undefined method `[]' for nil` occurs Prism 0.24.0. It has been resolved in |
31 | | - # the development line. This will be resolved in Prism > 0.24.0 and higher releases. |
32 | | - it "registers an offense when using string argument for `#{method}` method", broken_on: :prism do |
| 30 | + it "registers an offense when using string argument for `#{method}` method" do |
33 | 31 | expect_offense(<<~RUBY, method: method) |
34 | 32 | #{method}('do_something') |
35 | 33 | _{method} ^^^^^^^^^^^^^^ Use `:do_something` instead of `'do_something'`. |
|
40 | 38 | RUBY |
41 | 39 | end |
42 | 40 |
|
43 | | - # FIXME: `undefined method `[]' for nil` occurs Prism 0.24.0. It has been resolved in |
44 | | - # the development line. This will be resolved in Prism > 0.24.0 and higher releases. |
45 | | - it "does not register an offense when using symbol argument for `#{method}` method", broken_on: :prism do |
| 41 | + it "does not register an offense when using symbol argument for `#{method}` method" do |
46 | 42 | expect_no_offenses(<<~RUBY) |
47 | 43 | #{method}(:do_something) |
48 | 44 | RUBY |
49 | 45 | end |
50 | 46 |
|
51 | 47 | if described_class::INTERPOLATION_IGNORE_METHODS.include?(method) |
52 | | - # FIXME: `undefined method `[]' for nil` occurs Prism 0.24.0. It has been resolved in |
53 | | - # the development line. This will be resolved in Prism > 0.24.0 and higher releases. |
54 | | - it 'does not register an offense when using string interpolation for `#{method}` method', broken_on: :prism do |
| 48 | + it 'does not register an offense when using string interpolation for `#{method}` method' do |
55 | 49 | # NOTE: These methods don't support `::` when passing a symbol. const_get('A::B') is valid |
56 | 50 | # but const_get(:'A::B') isn't. Since interpolated arguments may contain any content these |
57 | 51 | # cases are not detected as an offense to prevent false positives. |
|
60 | 54 | RUBY |
61 | 55 | end |
62 | 56 | else |
63 | | - # FIXME: `undefined method `[]' for nil` occurs Prism 0.24.0. It has been resolved in |
64 | | - # the development line. This will be resolved in Prism > 0.24.0 and higher releases. |
65 | | - it 'registers an offense when using interpolated string argument', broken_on: :prism do |
| 57 | + it 'registers an offense when using interpolated string argument' do |
66 | 58 | expect_offense(<<~RUBY, method: method) |
67 | 59 | #{method}("do_something_\#{var}") |
68 | 60 | _{method} ^^^^^^^^^^^^^^^^^^^^^ Use `:"do_something_\#{var}"` instead of `"do_something_\#{var}"`. |
|
0 commit comments