RubyLex fails to read "#{Time.now.strftime("%m/%d")}"

e$B$`$H$&$G$9!#e(B

RubyLexe$B$r;H$o$5$;[email protected]$$$F$$$k$N$G$9$,e(B
“#{Time.now.strftime(”%m/%d")}"
e$B$H$$$&7A<0$NJ8;zNs$,$"$k>l9g!"%7%s%?%C%/%9%(%i!<$K$J$j$^$9!#e(B

e$B0J2<$N$h$&$K$9$k$H:F8=$7$^$9!#e(B

% ruby -rirb/ruby-lex -e ‘RubyLex.new.lex’
“#{Time.now.strftime(”%m/%d")}"
/usr/lib/ruby/1.8/irb/ruby-lex.rb:938:in identify_quotation': unknown type of %string (RubyLex::SyntaxError) from /usr/lib/ruby/1.8/irb/ruby-lex.rb:694:inlex_int2’
from /usr/lib/ruby/1.8/irb/slex.rb:237:in call' from /usr/lib/ruby/1.8/irb/slex.rb:237:inmatch_io’
from /usr/lib/ruby/1.8/irb/slex.rb:222:in match_io' from /usr/lib/ruby/1.8/irb/slex.rb:76:inmatch’
from /usr/lib/ruby/1.8/irb/ruby-lex.rb:287:in token' from /usr/lib/ruby/1.8/irb/ruby-lex.rb:263:inlex’
from -e:1
% ruby -v
ruby 1.8.5 (2006-12-04 patchlevel 2) [x86_64-linux]

Rubye$B$NJ8K!$H$7$F%(%i!<$K$O$J$j$^$;$s$N$Ge(B
e$B$3$3$Ge(BSyntaxErrore$B$K$J$k$N$OLdBj$J$h$&$J5$$,$7$^$9!#e(B

e$B$`$H$&$G$9!#e(B

On Sun, 14 Jan 2007 01:50:27 +0900
Yukihiro M. [email protected] wrote:

e$B$O;v<B$G$9$,e(B([email protected]$7!"e(BRubyLexe$B$,3+H/$5$l$?;[email protected]$G$O%7%s%?%C%/%9e(B
e$B%(%i!<[email protected]$C$?e(B)e$B!“4pK\E*9=B$$+$i8+D>$5$J$$$HBP1~$G$-$^$;$s!#$?e(B
e$B$V$s!”$A$c$s$HBP1~$9$k$K$Oe(BRippere$B$J$I$r;H$&$h$&$K$7$?J}$,$h$$e(B
e$B$s$8$c$J$$$+$H;W$$$^$9!#e(B

e$B$J$k$[$I$=$&$G$7$?$+!#e(B
“#{Time.now.strftime(’%m/%d’)}”
e$B$H$9$k$H2sHr$G$-$k$N$G$=$A$i$r;H$C$F$b$i$&$h$&$K$7$^$9!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:30131] RubyLex fails to read
“#{Time.now.strftime(”%m/%d”)}""
on Sun, 14 Jan 2007 01:11:32 +0900, Masao M.
[email protected] writes:

|RubyLexe$B$r;H$o$5$;[email protected]$$$F$$$k$N$G$9$,e(B
|"#{Time.now.strftime("%m/%d")}"
|e$B$H$$$&7A<0$NJ8;zNs$,$"$k>l9g!"%7%s%?%C%/%9%(%i!<$K$J$j$^$9!#e(B

RubyLexe$B$O%M%9%H$7$?%/%!<%H$KBP1~$7$F$$$^$;$s!#%P%0$G$"$k$Ne(B
e$B$O;v<B$G$9$,e(B([email protected]$7!"e(BRubyLexe$B$,3+H/$5$l$?;[email protected]$G$O%7%s%?%C%/%9e(B
e$B%(%i!<[email protected]$C$?e(B)e$B!"4pK\E
9=B$$+$i8+D>$5$J$$$HBP1~$G$-$^$;$s!#$?e(B
e$B$V$s!"$A$c$s$HBP1~$9$k$K$Oe(BRippere$B$J$I$r;H$&$h$&$K$7$?J}$,$h$$e(B
e$B$s$8$c$J$$$+$H;W$$$^$9!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs