Skip to content

Commit bf753a1

Browse files
committed
Use same type for scopes across translators
1 parent ebced97 commit bf753a1

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/prism/translation/ruby_parser.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,11 +1624,13 @@ def visit_write_value(node)
16241624
end
16251625
end
16261626

1627-
attr_accessor :scopes # :nodoc:
1627+
# Optional scopes to pass to the parser.
1628+
attr_reader :scopes #: Array[Array[Symbol]]?
16281629

1629-
def initialize scopes:nil # :nodoc:
1630+
#: (?scopes: Array[Array[Symbol]]?) -> void
1631+
def initialize(scopes: nil)
16301632
super()
1631-
self.scopes = [scopes] if scopes
1633+
@scopes = scopes
16321634
end
16331635

16341636
# Parse the given source and translate it into the seattlerb/ruby_parser

0 commit comments

Comments
 (0)