summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--lib/irb/init.rb3
-rw-r--r--lib/irb/lc/help-message1
-rw-r--r--lib/irb/lc/ja/help-message1
-rw-r--r--sprintf.c6
5 files changed, 21 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 412cd3bd45..8f19057652 100644
--- a/ChangeLog
+++ b/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>
* 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.
+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>
* sprintf.c (rb_f_sprintf): clean up.
diff --git a/lib/irb/init.rb b/lib/irb/init.rb
index 1df2926fa5..8b6ff6264d 100644
--- a/lib/irb/init.rb
+++ b/lib/irb/init.rb
@@ -126,6 +126,9 @@ module IRB
when "-r"
opt = ARGV.shift
@CONF[:LOAD_MODULES].push opt if opt
+ when "-I"
+ opt = ARGV.shift
+ $LOAD_PATH.push opt if opt
when /^-K(.)/
$KCODE = $1
when "--inspect"
diff --git a/lib/irb/lc/help-message b/lib/irb/lc/help-message
index 42e861a343..efc00bf148 100644
--- a/lib/irb/lc/help-message
+++ b/lib/irb/lc/help-message
@@ -14,6 +14,7 @@ Usage: irb.rb [options] [programfile] [arguments]
-m Bc mode (load mathn, fraction or matrix are available)
-d Set $DEBUG to true (same as `ruby -d')
-r load-module Same as `ruby -r'
+ -I path Specify $LOAD_PATH directory
--inspect Use `inspect' for output (default except for bc mode)
--noinspect Don't use inspect for output
--readline Use Readline extension module
diff --git a/lib/irb/lc/ja/help-message b/lib/irb/lc/ja/help-message
index 1cf980f6ba..4b710c7788 100644
--- a/lib/irb/lc/ja/help-message
+++ b/lib/irb/lc/ja/help-message
@@ -14,6 +14,7 @@ Usage: irb.rb [options] [programfile] [arguments]
-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)
-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).
--noinspect $B7k2L=PNO$K(Binspect$B$rMQ$$$J$$(B.
--readline readline$B%i%$%V%i%j$rMxMQ$9$k(B.
diff --git a/sprintf.c b/sprintf.c
index 73282b88a2..6de45618c8 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -544,7 +544,7 @@ rb_f_sprintf(argc, argv)
if (base == 10) {
rb_warning("negative number for %%u specifier");
}
- else if (!(flags&FPREC)) {
+ else if (!(flags&(FPREC|FZERO))) {
strcpy(s, "..");
s += 2;
}
@@ -602,7 +602,7 @@ rb_f_sprintf(argc, argv)
remove_sign_bits(++s, base);
tmp = rb_str_new(0, 3+strlen(s));
t = RSTRING(tmp)->ptr;
- if (!(flags&FPREC)) {
+ if (!(flags&(FPREC|FZERO))) {
strcpy(t, "..");
t += 2;
}
@@ -660,7 +660,7 @@ rb_f_sprintf(argc, argv)
else {
char c;
- if (bignum && !RBIGNUM(val)->sign)
+ if (!sign && bignum && !RBIGNUM(val)->sign)
c = sign_bits(base, p);
else
c = '0';