Issue #1939 has been updated by Magnus Holm.

File patch.diff added

Okay, this turned out to be a lot more easier than I expected.

See the attached diff for a complete patch. http://gist.github.com/198967 is the same patch split up in four different files, so you can more easily review it.

Description of the patches:

0001-test-ripper-test_parser_events.rb-Add-test-case-for.patch:
This patch adds a new test case for the bug. This requires the patch at #2169 in order to run.

0002-parse.y-Ripper-now-uses-a-struct-for-YYSTYPE.patch:
This patch makes Ripper use a struct instead of a union, so we can't get/set both the ID and the VALUE.

0003-parse.y-Expose-lvtbl-to-Ripper.patch:
This patch places makes the required functions visible to Ripper. I've simply placed #endif and #ifndef RIPPER around it (so it's easier to see what's actually changed). In the final patch, these should rather be re-organized. This also defines assignment_var, which is equal to assignable except it doesn't return a NODE.

0004-parse.y-Ripper-now-uses-the-lvtbl.patch:
This patch moves functions like local_push() out of the Ruby-only-macros, and makes sure .id is always called.


Can someone please review these patches? If everything seems fine, I can reorganize the functions, update the ChangeLog and push it to GitHub so Shyuohei can commit it to the SVN repo.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1939

----------------------------------------
http://redmine.ruby-lang.org