summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-29 05:20:39 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-29 05:20:39 +0000
commit4ab1577db3bb1358af5fd387a59c541621f5df1e (patch)
tree568c351a894d8dfe24458b342b4e79d8df5444b2 /file.c
parent99551555c8c957aca4ad01a776252acf3aa37775 (diff)
* parse.y: yyparse #defines moved from intern.h
* ruby.c (proc_options): access prefixed "ruby_yydebug". * applied modifies to pacify some of gcc -Wall warnings. * parse.y (arg): no more ugly hack for "**", so that "-2**2" to be parsed as "(-2)**2", whereas "- 2**2" or "-(2)**2" to be parsed as "-(2**2)". * parse.y (yylex): '-2' to be literal fixnum. [new] * time.c (time_succ): new method for Range support. * time.c (time_arg): nil test against v[6] (usec). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/file.c b/file.c
index 6b8527b268..718a38075e 100644
--- a/file.c
+++ b/file.c
@@ -294,7 +294,7 @@ rb_stat_inspect(self)
{
VALUE str;
int i;
- struct {
+ static struct {
char *name;
VALUE (*func)();
} member[] = {
@@ -329,13 +329,13 @@ rb_stat_inspect(self)
if (i == 2) { /* mode */
char buf[32];
- sprintf(buf, "0%o", NUM2INT(v));
+ sprintf(buf, "0%lo", NUM2INT(v));
rb_str_buf_cat2(str, buf);
}
else if (i == 0 || i == 6) { /* dev/rdev */
char buf[32];
- sprintf(buf, "0x%x", NUM2ULONG(v));
+ sprintf(buf, "0x%lx", NUM2ULONG(v));
rb_str_buf_cat2(str, buf);
}
else {