-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Source#string=
method
#117
Conversation
lib/rexml/parsers/baseparser.rb
Outdated
@@ -211,8 +211,9 @@ def pull_event | |||
#STDERR.puts @source.encoding | |||
#STDERR.puts "BUFFER = #{@source.buffer.inspect}" | |||
if @document_status == nil | |||
pos = @source.pos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about renaming pos
to start_position
or something to indicate this is the position before we parsing the next event?
lib/rexml/source.rb
Outdated
def pos | ||
@scanner.pos | ||
end | ||
|
||
def pos=(pos) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about avoid abbreviation here? The original word isn't so long.
def pos | |
@scanner.pos | |
end | |
def pos=(pos) | |
def position | |
@scanner.pos | |
end | |
def position=(position) |
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.
ab1816b
to
e59a2af
Compare
Thanks! |
Why?
We want to just change scan pointer.
#114 (comment)