Remove Source#string= method#117
Merged
Merged
Conversation
kou
reviewed
Mar 3, 2024
| #STDERR.puts @source.encoding | ||
| #STDERR.puts "BUFFER = #{@source.buffer.inspect}" | ||
| if @document_status == nil | ||
| pos = @source.pos |
Member
There was a problem hiding this comment.
How about renaming pos to start_position or something to indicate this is the position before we parsing the next event?
Comment on lines
+79
to
+83
| def pos | ||
| @scanner.pos | ||
| end | ||
|
|
||
| def pos=(pos) |
Member
There was a problem hiding this comment.
How about avoid abbreviation here? The original word isn't so long.
Suggested change
| def pos | |
| @scanner.pos | |
| end | |
| def pos=(pos) | |
| def position | |
| @scanner.pos | |
| end | |
| def position=(position) |
naitoh
force-pushed
the
remove_source_string_method
branch
from
March 3, 2024 09:29
b9ebca5 to
ab1816b
Compare
## Why? We want to just change scan pointer. ruby#114 (comment) > I want to just change scan pointer (StringScanner#pos=) instead of changing @scanner.string.
naitoh
force-pushed
the
remove_source_string_method
branch
from
March 3, 2024 10:51
ab1816b to
e59a2af
Compare
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
We want to just change scan pointer.
#114 (comment)