ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:43775] [ruby-trunk - Bug #6211][Open] Ripper lexes :on_rbrace when it should find :on_embexpr_end
@ 2012-03-27 17:58 turboladen (Steve Loveless)
  2012-04-09  5:20 ` [ruby-core:44212] [ruby-trunk - Bug #6211] " ko1 (Koichi Sasada)
  2012-04-10 20:09 ` [ruby-core:44276] " turboladen (Steve Loveless)
  0 siblings, 2 replies; 3+ messages in thread
From: turboladen (Steve Loveless) @ 2012-03-27 17:58 UTC (permalink / raw
  To: ruby-core


Issue #6211 has been reported by turboladen (Steve Loveless).

----------------------------------------
Bug #6211: Ripper lexes :on_rbrace when it should find :on_embexpr_end
https://bugs.ruby-lang.org/issues/6211

Author: turboladen (Steve Loveless)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0]


=begin
  1.9.3-p125 :001 > require 'ripper'
   => true
  1.9.3-p125 :002 > Ripper.lex %Q{`\#{cmd}`}
   => [[[1, 0], :on_backtick, "`"], [[1, 1], :on_embexpr_beg, "\#{"], [[1, 3], :on_ident, "cmd"], [[1, 6], :on_rbrace, "}"], [[1, 7], :on_tstring_end, "`"]]

I'd expect (({[[1, 6], :on_rbrace, "}"]})) to be (({[[1, 6], :on_embexpr_end, "}"]})).

I also just noticed that there's similar behavior with backticks--the first gets parsed as such, but the last gets parsed as (({:on_tstring_end})).  This seems less obvious/important (?) compared to the embexpr stuff, as the type of embexpr tokens imply a beg & end; backticks don't imply beg & end, but, all the same, feel inconsistent.
=end


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:44212] [ruby-trunk - Bug #6211] Ripper lexes :on_rbrace when it should find :on_embexpr_end
  2012-03-27 17:58 [ruby-core:43775] [ruby-trunk - Bug #6211][Open] Ripper lexes :on_rbrace when it should find :on_embexpr_end turboladen (Steve Loveless)
@ 2012-04-09  5:20 ` ko1 (Koichi Sasada)
  2012-04-10 20:09 ` [ruby-core:44276] " turboladen (Steve Loveless)
  1 sibling, 0 replies; 3+ messages in thread
From: ko1 (Koichi Sasada) @ 2012-04-09  5:20 UTC (permalink / raw
  To: ruby-core


Issue #6211 has been updated by ko1 (Koichi Sasada).

Category set to ext
Assignee set to nobu (Nobuyoshi Nakada)


----------------------------------------
Bug #6211: Ripper lexes :on_rbrace when it should find :on_embexpr_end
https://bugs.ruby-lang.org/issues/6211#change-25738

Author: turboladen (Steve Loveless)
Status: Open
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: ext
Target version: 
ruby -v: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0]


=begin
  1.9.3-p125 :001 > require 'ripper'
   => true
  1.9.3-p125 :002 > Ripper.lex %Q{`\#{cmd}`}
   => [[[1, 0], :on_backtick, "`"], [[1, 1], :on_embexpr_beg, "\#{"], [[1, 3], :on_ident, "cmd"], [[1, 6], :on_rbrace, "}"], [[1, 7], :on_tstring_end, "`"]]

I'd expect (({[[1, 6], :on_rbrace, "}"]})) to be (({[[1, 6], :on_embexpr_end, "}"]})).

I also just noticed that there's similar behavior with backticks--the first gets parsed as such, but the last gets parsed as (({:on_tstring_end})).  This seems less obvious/important (?) compared to the embexpr stuff, as the type of embexpr tokens imply a beg & end; backticks don't imply beg & end, but, all the same, feel inconsistent.
=end


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:44276] [ruby-trunk - Bug #6211] Ripper lexes :on_rbrace when it should find :on_embexpr_end
  2012-03-27 17:58 [ruby-core:43775] [ruby-trunk - Bug #6211][Open] Ripper lexes :on_rbrace when it should find :on_embexpr_end turboladen (Steve Loveless)
  2012-04-09  5:20 ` [ruby-core:44212] [ruby-trunk - Bug #6211] " ko1 (Koichi Sasada)
@ 2012-04-10 20:09 ` turboladen (Steve Loveless)
  1 sibling, 0 replies; 3+ messages in thread
From: turboladen (Steve Loveless) @ 2012-04-10 20:09 UTC (permalink / raw
  To: ruby-core


Issue #6211 has been updated by turboladen (Steve Loveless).


Hooray!  Thank you!
----------------------------------------
Bug #6211: Ripper lexes :on_rbrace when it should find :on_embexpr_end
https://bugs.ruby-lang.org/issues/6211#change-25812

Author: turboladen (Steve Loveless)
Status: Closed
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: ext
Target version: 
ruby -v: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0]


=begin
  1.9.3-p125 :001 > require 'ripper'
   => true
  1.9.3-p125 :002 > Ripper.lex %Q{`\#{cmd}`}
   => [[[1, 0], :on_backtick, "`"], [[1, 1], :on_embexpr_beg, "\#{"], [[1, 3], :on_ident, "cmd"], [[1, 6], :on_rbrace, "}"], [[1, 7], :on_tstring_end, "`"]]

I'd expect (({[[1, 6], :on_rbrace, "}"]})) to be (({[[1, 6], :on_embexpr_end, "}"]})).

I also just noticed that there's similar behavior with backticks--the first gets parsed as such, but the last gets parsed as (({:on_tstring_end})).  This seems less obvious/important (?) compared to the embexpr stuff, as the type of embexpr tokens imply a beg & end; backticks don't imply beg & end, but, all the same, feel inconsistent.
=end


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-10 20:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-27 17:58 [ruby-core:43775] [ruby-trunk - Bug #6211][Open] Ripper lexes :on_rbrace when it should find :on_embexpr_end turboladen (Steve Loveless)
2012-04-09  5:20 ` [ruby-core:44212] [ruby-trunk - Bug #6211] " ko1 (Koichi Sasada)
2012-04-10 20:09 ` [ruby-core:44276] " turboladen (Steve Loveless)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).