summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-13 08:58:20 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-13 08:58:20 +0000
commita4cd53342084a82fdd9c6ff8840d07797383080d (patch)
tree1f6914c630d5bdc6fbfc79e955bd4449936c6e04
parent76a42c4cf33337754d6652109fdc713c8b9230c3 (diff)
downloadruby-a4cd53342084a82fdd9c6ff8840d07797383080d.tar.gz
ruby-a4cd53342084a82fdd9c6ff8840d07797383080d.tar.xz
ruby-a4cd53342084a82fdd9c6ff8840d07797383080d.zip
* lib/open-uri.rb (OpenURI.open_uri): use File::RDONLY.
reported by Take_tk <ggb03124@nifty.ne.jp>. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/open-uri.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fa7a0bd37..2764d4550 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Nov 13 17:56:41 2003 Tanaka Akira <akr@m17n.org>
+
+ * lib/open-uri.rb (OpenURI.open_uri): use File::RDONLY.
+ reported by Take_tk <ggb03124@nifty.ne.jp>.
+
Thu Nov 13 16:45:53 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/ossl_x509req.c (ossl_x509req_to_der): add function for
diff --git a/lib/open-uri.rb b/lib/open-uri.rb
index 8ff5a10b8..132a1f466 100644
--- a/lib/open-uri.rb
+++ b/lib/open-uri.rb
@@ -98,7 +98,7 @@ module OpenURI
unless mode == nil ||
mode == 'r' || mode == 'rb' ||
- mode == O_RDONLY
+ mode == File::RDONLY
raise ArgumentError.new("invalid access mode #{mode} (#{uri.class} resource is read only.)")
end