diff options
| author | Ufuk Kayserilioglu <ufuk.kayserilioglu@shopify.com> | 2024-03-06 14:52:47 -0500 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-03-06 21:37:54 +0000 |
| commit | de411ef0b611b171b4055a5f469637fdb77487a6 (patch) | |
| tree | f6ce5d9c2d121cb18644a3a0ac10b2b48d19f299 | |
| parent | 8d191a9f57fa6ff86f63c98e99be68ed86f3052c (diff) | |
[ruby/prism] Small changes to make type-checking pass
https://github.com/ruby/prism/commit/5b2970e75b
| -rw-r--r-- | lib/prism/parse_result.rb | 7 | ||||
| -rw-r--r-- | lib/prism/translation/parser/compiler.rb | 2 |
2 files changed, 1 insertions, 8 deletions
diff --git a/lib/prism/parse_result.rb b/lib/prism/parse_result.rb index bd2349f60b..c54c883eea 100644 --- a/lib/prism/parse_result.rb +++ b/lib/prism/parse_result.rb @@ -276,13 +276,6 @@ module Prism Location.new(source, start_offset, other.end_offset - start_offset) end - - # Returns a null location that does not correspond to a source and points to - # the beginning of the file. Useful for when you want a location object but - # do not care where it points. - def self.null - new(nil, 0, 0) # steep:ignore - end end # This represents a comment that was encountered during parsing. It is the diff --git a/lib/prism/translation/parser/compiler.rb b/lib/prism/translation/parser/compiler.rb index 4ca706c764..8170e1953b 100644 --- a/lib/prism/translation/parser/compiler.rb +++ b/lib/prism/translation/parser/compiler.rb @@ -1806,7 +1806,7 @@ module Prism # Visit a heredoc that can be either a string or an xstring. def visit_heredoc(node) - children = [] + children = Array.new node.parts.each do |part| pushing = if part.is_a?(StringNode) && part.unescaped.include?("\n") |
