[#70252] Re: [ruby-cvs:58640] nobu:r51492 (trunk): node.c: NODE_ALLOCA for ALLOCV — Eric Wong <normalperson@...>
Besides possible backwards compatibility, can we drop volatile
3 messages
2015/08/05
[#70257] [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI — ko1@...
Issue #11420 has been reported by Koichi Sasada.
11 messages
2015/08/06
[#70337] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/11
Nice. Thank you guys for looking into this.
[#70349] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/12
Btw, did you consider using flexible array to avoid extra malloc
[#70355] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Юрий Соколов <funny.falcon@...>
2015/08/12
I thought to suggest to embed hash_id_table directly into places when it is
[#70356] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— SASADA Koichi <ko1@...>
2015/08/12
On 2015/08/13 4:29, Юрий Соколов wrote:
[#70358] Re: [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI
— Eric Wong <normalperson@...>
2015/08/12
SASADA Koichi <ko1@atdot.net> wrote:
[#70509] [Ruby trunk - Misc #11276] [RFC] compile.c: convert to use ccan/list — ko1@...
Issue #11276 has been updated by Koichi Sasada.
3 messages
2015/08/21
[#70639] the undefined behavior of an iterator if it is modified inside of the block to which it yields — Daniel Doubrovkine <dblock@...>
(this is my first time e-mailing list list, so apologies for any misstep :)
4 messages
2015/08/31
[ruby-core:70581] [Ruby trunk - Bug #11485] [Open] Ripper parser generates nil tokens for ignored_nl event during parse errors
From:
lsegal@...
Date:
2015-08-24 19:34:45 UTC
List:
ruby-core #70581
Issue #11485 has been reported by Loren Segal.
----------------------------------------
Bug #11485: Ripper parser generates nil tokens for ignored_nl event during parse errors
https://bugs.ruby-lang.org/issues/11485
* Author: Loren Segal
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: 2.3.0-dev
* Backport: 2.0.0: DONTNEED, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
This seems to be a regression in the Ripper parser where the `on_ignored_nl` event is passed a nil value for the token parameter in the event when a syntax error occurs. I'm not entirely sure of the details, but this is the most minimal reproduction example I could produce:
~~~
require 'ripper'
class Parser < Ripper
def on_ignored_nl(*args) p args end
def on_parse_error(msg) $stderr.puts "ERROR! #{msg}" end
end
Parser.new(DATA, 'stdin').parse
__END__
something # comment
...
~~~
Note the "..." which causes the parse error, but the comment on the line before causes the ignored_nl event to get called with `nil` as the argument. I'm not sure if it's specific to the `...` token or if there are other ways to trigger this parse error. I tried with other invalid syntaxes and could not reproduce with those.
Running the above produces the following output (in 2.0.0p481 and 2.3.0-dev respective):
~~~
~$ ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
~$ ruby ripper-bug-2.2.0.rb
ERROR! syntax error, unexpected ..., expecting end-of-input
~$ ruby -v
ruby 2.3.0dev (2015-08-24 trunk 51672) [x86_64-darwin14]
~$ ruby ripper-bug-2.2.0.rb
[nil]
ERROR! syntax error, unexpected ..., expecting end-of-input
~~~
I would not expect the token parameter to ever be `nil`, since a token event should always have a token to pass in if it is triggered. Note that this event typically produces a "\n" token value (and still does in normal cases). The expectation should be to either provide a valid token or not trigger the event at all.
(This behavior is present in 2.2.0p95 as well.)
--
https://bugs.ruby-lang.org/