summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-27 08:32:44 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-27 08:32:44 +0000
commit7c95864980e1bccbc508974a78fbedc9dc0f9524 (patch)
tree851303a8137ffae6407e68ab6988ec2cd32bdb38
parent0a34a0a1d412366e3a609ca6e0778dab48ef8720 (diff)
merge revision(s) 16870:
* io.c (rb_open_file, rb_io_s_sysopen): fmode should be unsigned int. fixed [ruby-dev:34979] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--io.c10
-rw-r--r--version.h2
3 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index efca011fe2..344265a974 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jun 27 17:28:39 2008 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * io.c (rb_open_file, rb_io_s_sysopen): fmode should be unsigned int.
+ fixed [ruby-dev:34979]
+
Fri Jun 27 17:20:40 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.h: include ws2tcpip.h. fixed [ruby-Bugs-20528]
diff --git a/io.c b/io.c
index 00514c86f8..a65a304384 100644
--- a/io.c
+++ b/io.c
@@ -3285,7 +3285,8 @@ rb_open_file(argc, argv, io)
{
VALUE fname, vmode, perm;
char *path, *mode;
- int flags, fmode;
+ int flags;
+ unsigned int fmode;
rb_scan_args(argc, argv, "12", &fname, &vmode, &perm);
SafeStringValue(fname);
@@ -3299,7 +3300,7 @@ rb_open_file(argc, argv, io)
SafeStringValue(vmode);
flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
}
- fmode = NIL_P(perm) ? 0666 : NUM2INT(perm);
+ fmode = NIL_P(perm) ? 0666 : NUM2UINT(perm);
rb_file_sysopen_internal(io, path, flags, fmode);
}
@@ -3355,7 +3356,8 @@ rb_io_s_sysopen(argc, argv)
VALUE *argv;
{
VALUE fname, vmode, perm;
- int flags, fmode, fd;
+ int flags, fd;
+ unsigned int fmode;
char *path;
rb_scan_args(argc, argv, "12", &fname, &vmode, &perm);
@@ -3368,7 +3370,7 @@ rb_io_s_sysopen(argc, argv)
flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
}
if (NIL_P(perm)) fmode = 0666;
- else fmode = NUM2INT(perm);
+ else fmode = NUM2UINT(perm);
path = ALLOCA_N(char, strlen(RSTRING(fname)->ptr)+1);
strcpy(path, RSTRING(fname)->ptr);
diff --git a/version.h b/version.h
index 654857c006..e209ede79f 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-27"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080627
-#define RUBY_PATCHLEVEL 234
+#define RUBY_PATCHLEVEL 235
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8