Pre-processor での YARV 判定


#1

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B

e$B%3%s%Q%$%k;~$Ne(B pre-processor e$B%l%Y%k$G!$e(B
YARV e$BF3F~8e$Ne(B Ruby e$B$+$I$&$+$rH=Dj$9$k$N$Oe(B
e$B$I$N$h$&$K$9$k$N$,@5$7$$$d$jJ}$G$7$g$&$+!)e(B


#2

e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B

In message [ruby-dev:30163] pre-processor e$B$G$Ne(B YARV e$BH=Dje(B
on Jan.23,2007 12:51:12, removed_email_address@domain.invalid wrote:
| e$B%3%s%Q%$%k;~$Ne(B pre-processor e$B%l%Y%k$G!$e(B
| YARV e$BF3F~8e$Ne(B Ruby e$B$+$I$&$+$rH=Dj$9$k$N$Oe(B
| e$B$I$N$h$&$K$9$k$N$,@5$7$$$d$jJ}$G$7$g$&$+!)e(B

e$B;d$b0JA0$=$l$GG:$s$G$5$5$@$5$s$KJ9$$$?$N$G$9$,!V$J$$!W$H$$$&e(B
e$BJV;v$G$7$?!#e(B

e$B$H$$$&$o$1$G!"E,Ev$J%^%/%m$rF3F~$9$k$3$H$rDs0F$7$^$9!#e(B
USE_VM e$B$H$+!#e(B

e$B$=$l$G$O!#e(B


#3

e$B!!$5$5$@$G$9!#e(B

U.Nakamura wrote:

USE_VM e$B$H$+!#e(B
e$B!!$J$s$F%^%/%m$K$9$k$+$GG:$s$G$$$?$s$G$9$,!"e(B#define USE_VM 1
e$B$r2C$($k$3e(B
e$B$H$K$7$^$9!#e(Bruby.h e$B$KF~$l$A$c$C$F$$$$$s$G$9$+$M!)e(B


#4

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

In message Re: [ruby-dev:30166] Re: pre-processor e$B$G$Ne(B YARV
e$BH=Dje(B
on Tue, 23 Jan 2007 14:26:07 +0900, SASADA Koichi removed_email_address@domain.invalid
writes:

|e$B!!$J$s$F%^%/%m$K$9$k$+$GG:$s$G$$$?$s$G$9$,!"e(B#define USE_VM 1 e$B$r2C$($k$3e(B
|e$B$H$K$7$^$9!#e(Bruby.h e$B$KF~$l$A$c$C$F$$$$$s$G$9$+$M!)e(B

e$B$=$s$J=EMW$=$&$J%^%/%m$Ke(Bprefixe$B$D$1$J$/$F$$$$$s$G$9$+!)e(B


#5

e$B!!$5$5$@$G$9!#e(B

Nobuyoshi N. wrote:

e$B$=$s$J=EMW$=$&$J%^%/%m$Ke(Bprefixe$B$D$1$J$/$F$$$$$s$G$9$+!)e(B

RUBY_VM_VERSIONe$B$H$+$K$7$H$$$?$[$&$,8e!9=u$+$k$3$H$,$"$j$=$&$J5$$,$7$?$je(B
e$B$7$J$+$C$?$j!#e(B

e$B!!$G$O!e(Bversion.h e$B$Ke(B #define RUBY_VM_VERSION 1
e$B$rDI2C!$H$$$&$3$H$G$$e(B
e$B$$$C$9$+$M!#e(B


#6

e$B!!$5$5$@$G$9!#e(B

SASADA Koichi wrote:

Nobuyoshi N. wrote:

e$B$=$s$J=EMW$=$&$J%^%/%m$Ke(Bprefixe$B$D$1$J$/$F$$$$$s$G$9$+!)e(B
RUBY_VM_VERSIONe$B$H$+$K$7$H$$$?$[$&$,8e!9=u$+$k$3$H$,$"$j$=$&$J5$$,$7$?$je(B
e$B$7$J$+$C$?$j!#e(B

e$B!!$G$O!e(Bversion.h e$B$Ke(B #define RUBY_VM_VERSION 1 e$B$rDI2C!$H$$$&$3$H$G$$e(B
e$B$$$C$9$+$M!#e(B

e$B!!e(Bversion.h e$B$C$Fe(B ruby.h e$B$+$ie(B include
e$B$5$l$F$^$;$s$G$7$?$M!#e(Bruby.h e$B$K=q$$e(B
e$B$?$[$&$,$$$$$G$7$g$&$+!)e(B


#7

e$B$J$+$@$G$9!#e(B

At Tue, 23 Jan 2007 14:49:53 +0900,
Yukihiro M. wrote in [ruby-dev:30169]:

|e$B!!$J$s$F%^%/%m$K$9$k$+$GG:$s$G$$$?$s$G$9$,!"e(B#define USE_VM 1 e$B$r2C$($k$3e(B
|e$B$H$K$7$^$9!#e(Bruby.h e$B$KF~$l$A$c$C$F$$$$$s$G$9$+$M!)e(B

e$B$=$s$J=EMW$=$&$J%^%/%m$Ke(Bprefixe$B$D$1$J$/$F$$$$$s$G$9$+!)e(B

RUBY_VM_VERSIONe$B$H$+$K$7$H$$$?$[$&$,8e!9=u$+$k$3$H$,$"$j$=$&$J5$$,$7$?$j$7$J$+$C$?$j!#e(B


#8

e$BA0ED$G$9!#e(B

SASADA Koichi wrote:

Nobuyoshi N. wrote:

e$B$=$s$J=EMW$=$&$J%^%/%m$Ke(Bprefixe$B$D$1$J$/$F$$$$$s$G$9$+!)e(B
RUBY_VM_VERSIONe$B$H$+$K$7$H$$$?$[$&$,8e!9=u$+$k$3$H$,$"$j$=$&$J5$$,$7$?$je(B
e$B$7$J$+$C$?$j!#e(B

e$B!!$G$O!e(Bversion.h e$B$Ke(B #define RUBY_VM_VERSION 1 e$B$rDI2C!$H$$$&$3$H$G$$e(B
e$B$$$C$9$+$M!#e(B

RUBY_VM_VERSIONe$B$C$F$I$&$$$&;~$K%$%s%/%j%a%s%H$9$k$s$G$9$+!)e(B


#9

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

In message Re: [ruby-dev:30173] Re: pre-processor e$B$G$Ne(B YARV
e$BH=Dje(B
on Tue, 23 Jan 2007 15:53:09 +0900, SASADA Koichi removed_email_address@domain.invalid
writes:

|e$B!!e(Bversion.h e$B$C$Fe(B ruby.h e$B$+$ie(B include e$B$5$l$F$^$;$s$G$7$?$M!#e(Bruby.h e$B$K=q$$e(B
|e$B$?$[$&$,$$$$$G$7$g$&$+!)e(B

RUBY_VM_VERSIONe$B$H$$$&L>A0$K$9$k$+$I$&$+$O$H$b$+$/!e(BYARVe$B$+$Ie(B
e$B$&$+H=Dj$9$k%^%/%mDj?t$Oe(Bruby.he$B$K$$C$?J}$,NI$$$H;W$$$^$9!#e(B


#10

e$B!!$5$5$@$G$9!#e(B

Yukihiro M. wrote:

RUBY_VM_VERSIONe$B$H$$$&L>A0$K$9$k$+$I$&$+$O$H$b$+$/!e(BYARVe$B$+$Ie(B
e$B$&$+H=Dj$9$k%^%/%mDj?t$Oe(Bruby.he$B$K$$C$?J}$,NI$$$H;W$$$^$9!#e(B

e$B!!$I$s$J%^%/%mL>$,E,Ev$@$H;W$$$^$9$+!)e(B


#11

Hi,

In message Re: [ruby-dev:30203] Re: pre-processor e$B$G$Ne(B YARV
e$BH=Dje(B
on Mon, 29 Jan 2007 10:27:58 +0900, SASADA Koichi removed_email_address@domain.invalid
writes:

|Yukihiro M. wrote:
|> RUBY_VM_VERSIONe$B$H$$$&L>A0$K$9$k$+$I$&$+$O$H$b$+$/!e(BYARVe$B$+$Ie(B
|> e$B$&$+H=Dj$9$k%^%/%mDj?t$Oe(Bruby.he$B$K$$C$?J}$,NI$$$H;W$$$^$9!#e(B
|
|e$B!!$I$s$J%^%/%mL>$,E,Ev$@$H;W$$$^$9$+!)e(B

e$B;d$Oe(BVM_VERSIONe$B$K4X?4$OL5$$$N$G!e(BRUBY_CORE_YARVe$B$H$+!#$$$d!$be(B
e$B$&e(BYARVe$B$G$O$J$$$H$$$&$3$H$J$N$+$b$7$l$J$$$1$I!#e(B


#12

e$B!!$5$5$@$G$9!#e(B

Shugo M. wrote:

RUBY_VM_VERSIONe$B$C$F$I$&$$$&;~$K%$%s%/%j%a%s%H$9$k$s$G$9$+!)e(B

e$B!!Nc$($Pe(B jruby e$B$,8x<0=hM}7O$K$J$C$?$H$-$H$+!"e(Brubinium
e$B$,8x<0=hM}7O$K$J$Ce(B
e$B$?$H$-$H$+!)!!e(BVM
e$B$N9=B$$,Bg$-$/JQ$o$C$?$H$-$K$OJQ$($F$b$$$$$h$&$J5$$,$7e(B
e$B$^$9!#e(B


#13

e$B$J$+$@$G$9!#e(B

At Mon, 29 Jan 2007 10:27:56 +0900,
SASADA Koichi wrote in [ruby-dev:30201]:

RUBY_VM_VERSIONe$B$C$F$I$&$$$&;~$K%$%s%/%j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