You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Compiles reader methods so we don't have to go through method_missing.
def self.compile_methods!(keys)
keys.reject { |m| method_defined?(m) }.each do |key|
- class_eval <<-RUBY, __FILE__, __LINE__ + 1- def #{key}; _get(#{key.inspect}); end- RUBY+ class_eval <<-RUBY+ def #{key}; _get(#{key+ .inspect}); end+ RUBY,+ __FILE__,+ __LINE__ + 1
end
end
end
Note that this code crashes when running prettier again on the same file:
src/ripper.rb:33:in block in parse': undefined method []' for nil:NilClass (NoMethodError)
Expected output
Not to crash
Reproduction
Run prettier with --write twice on the Rail's file, or once with --debug-check
Input
https://github.com/rails/rails/blob/9099d66bc38f2e560613258f520d46df624d99c0/activesupport/lib/active_support/configurable.rb
Current output
Note that this code crashes when running prettier again on the same file:
Expected output
Not to crash
Reproduction
Run prettier with
--write
twice on the Rail's file, or once with--debug-check
The text was updated successfully, but these errors were encountered: