From: Hugh Sasse Date: 2006-11-22T19:26:01+09:00 Subject: Re: Ruby 1.[89].\d+ and beyond. On Wed, 22 Nov 2006, Nobuyoshi Nakada wrote: > Hi, > > At Tue, 21 Nov 2006 00:16:06 +0900, > Hugh Sasse wrote in [ruby-core:09594]: > > Ouch. The only solution to that that I can think of would be > > to make the constant float, and add decimal places. I've forgotten [...] > > It doesn't work in preprocessor. Expression in C is not matter. > [...] > > OK > > $ echo -e '#if RUBY_VERSION_CODE > 185\nOK\n#else\nNG\n#endif' | > LANG=C gcc -E -DRUBY_VERSION_CODE=185.1 - > # 1 "" > # 1 "" > # 1 "" > # 1 "" > :1:5: floating constant in preprocessor expression Grrrrrrr! I'll have to admit defeat on this, then. This probably occurs in enough libraries to mean we can't change this without huge "horror stories". My major concerns about expanding the space to work in before 1.9 and beyond were: * Getting the speedups people have been developing, * Making it worthwhile to add more documentation. If it doesn't get released then it isn't worth the effort. I don't see how these matters can be addressed. Thank you for the explanation. When ruby hits 2.x could we use double digits at least for this in future? So Ruby 2.1.3 would have #define RUBY_VERSION_CODE 201030 I expect that's already been considered. > NG > Thank you, Hugh