зеркало из https://github.com/github/ruby.git
* lib/irb/init.rb (IRB::IRB.parse_opts): add -I option to
irb. [ruby-dev:39243] * sprintf.c (rb_f_sprintf): sign bit extension should not be done if FPLUS flag is specified. [ruby-list:39224] * sprintf.c (rb_f_sprintf): do not prepend dots for negative numbers if FZERO is specified. [ruby-dev:39218] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
611bb8f5a8
Коммит
50b775851a
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Feb 20 18:59:47 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/irb/init.rb (IRB::IRB.parse_opts): add -I option to
|
||||||
|
irb. [ruby-dev:39243]
|
||||||
|
|
||||||
Fri Feb 20 12:55:27 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri Feb 20 12:55:27 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (pipe_open): fix typo.
|
* io.c (pipe_open): fix typo.
|
||||||
|
@ -94,6 +99,14 @@ Wed Feb 18 17:18:01 2004 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
||||||
* ext/win32ole/win32ole.c: need to include <olectl.h> on Cygwin.
|
* ext/win32ole/win32ole.c: need to include <olectl.h> on Cygwin.
|
||||||
|
|
||||||
|
Wed Feb 18 10:40:38 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* sprintf.c (rb_f_sprintf): sign bit extension should not be done
|
||||||
|
if FPLUS flag is specified. [ruby-list:39224]
|
||||||
|
|
||||||
|
* sprintf.c (rb_f_sprintf): do not prepend dots for negative
|
||||||
|
numbers if FZERO is specified. [ruby-dev:39218]
|
||||||
|
|
||||||
Wed Feb 18 10:23:34 2004 NAKAMURA Usaku <usa@ruby-lang.org>
|
Wed Feb 18 10:23:34 2004 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* sprintf.c (rb_f_sprintf): clean up.
|
* sprintf.c (rb_f_sprintf): clean up.
|
||||||
|
|
|
@ -126,6 +126,9 @@ module IRB
|
||||||
when "-r"
|
when "-r"
|
||||||
opt = ARGV.shift
|
opt = ARGV.shift
|
||||||
@CONF[:LOAD_MODULES].push opt if opt
|
@CONF[:LOAD_MODULES].push opt if opt
|
||||||
|
when "-I"
|
||||||
|
opt = ARGV.shift
|
||||||
|
$LOAD_PATH.push opt if opt
|
||||||
when /^-K(.)/
|
when /^-K(.)/
|
||||||
$KCODE = $1
|
$KCODE = $1
|
||||||
when "--inspect"
|
when "--inspect"
|
||||||
|
|
|
@ -14,6 +14,7 @@ Usage: irb.rb [options] [programfile] [arguments]
|
||||||
-m Bc mode (load mathn, fraction or matrix are available)
|
-m Bc mode (load mathn, fraction or matrix are available)
|
||||||
-d Set $DEBUG to true (same as `ruby -d')
|
-d Set $DEBUG to true (same as `ruby -d')
|
||||||
-r load-module Same as `ruby -r'
|
-r load-module Same as `ruby -r'
|
||||||
|
-I path Specify $LOAD_PATH directory
|
||||||
--inspect Use `inspect' for output (default except for bc mode)
|
--inspect Use `inspect' for output (default except for bc mode)
|
||||||
--noinspect Don't use inspect for output
|
--noinspect Don't use inspect for output
|
||||||
--readline Use Readline extension module
|
--readline Use Readline extension module
|
||||||
|
|
|
@ -14,6 +14,7 @@ Usage: irb.rb [options] [programfile] [arguments]
|
||||||
-m bc$B%b!<%I(B($BJ,?t(B, $B9TNs$N7W;;$,$G$-$k(B)
|
-m bc$B%b!<%I(B($BJ,?t(B, $B9TNs$N7W;;$,$G$-$k(B)
|
||||||
-d $DEBUG $B$r(Btrue$B$K$9$k(B(ruby -d $B$HF1$8(B)
|
-d $DEBUG $B$r(Btrue$B$K$9$k(B(ruby -d $B$HF1$8(B)
|
||||||
-r load-module ruby -r $B$HF1$8(B.
|
-r load-module ruby -r $B$HF1$8(B.
|
||||||
|
-I path $LOAD_PATH $B$K(B path $B$rDI2C$9$k(B.
|
||||||
--inspect $B7k2L=PNO$K(Binspect$B$rMQ$$$k(B(bc$B%b!<%I0J30$O%G%U%)%k%H(B).
|
--inspect $B7k2L=PNO$K(Binspect$B$rMQ$$$k(B(bc$B%b!<%I0J30$O%G%U%)%k%H(B).
|
||||||
--noinspect $B7k2L=PNO$K(Binspect$B$rMQ$$$J$$(B.
|
--noinspect $B7k2L=PNO$K(Binspect$B$rMQ$$$J$$(B.
|
||||||
--readline readline$B%i%$%V%i%j$rMxMQ$9$k(B.
|
--readline readline$B%i%$%V%i%j$rMxMQ$9$k(B.
|
||||||
|
|
|
@ -544,7 +544,7 @@ rb_f_sprintf(argc, argv)
|
||||||
if (base == 10) {
|
if (base == 10) {
|
||||||
rb_warning("negative number for %%u specifier");
|
rb_warning("negative number for %%u specifier");
|
||||||
}
|
}
|
||||||
else if (!(flags&FPREC)) {
|
else if (!(flags&(FPREC|FZERO))) {
|
||||||
strcpy(s, "..");
|
strcpy(s, "..");
|
||||||
s += 2;
|
s += 2;
|
||||||
}
|
}
|
||||||
|
@ -602,7 +602,7 @@ rb_f_sprintf(argc, argv)
|
||||||
remove_sign_bits(++s, base);
|
remove_sign_bits(++s, base);
|
||||||
tmp = rb_str_new(0, 3+strlen(s));
|
tmp = rb_str_new(0, 3+strlen(s));
|
||||||
t = RSTRING(tmp)->ptr;
|
t = RSTRING(tmp)->ptr;
|
||||||
if (!(flags&FPREC)) {
|
if (!(flags&(FPREC|FZERO))) {
|
||||||
strcpy(t, "..");
|
strcpy(t, "..");
|
||||||
t += 2;
|
t += 2;
|
||||||
}
|
}
|
||||||
|
@ -660,7 +660,7 @@ rb_f_sprintf(argc, argv)
|
||||||
else {
|
else {
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
if (bignum && !RBIGNUM(val)->sign)
|
if (!sign && bignum && !RBIGNUM(val)->sign)
|
||||||
c = sign_bits(base, p);
|
c = sign_bits(base, p);
|
||||||
else
|
else
|
||||||
c = '0';
|
c = '0';
|
||||||
|
|
Загрузка…
Ссылка в новой задаче