[前][次][番号順一覧][スレッド一覧]

ruby-changes:10235

From: nobu <ko1@a...>
Date: Mon, 26 Jan 2009 15:50:09 +0900 (JST)
Subject: [ruby-changes:10235] Ruby:r21779 (trunk, ruby_1_8): * lib/pathname.rb (chop_basename, prepend_prefix): use o option.

nobu	2009-01-26 15:49:46 +0900 (Mon, 26 Jan 2009)

  New Revision: 21779

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21779

  Log:
    * lib/pathname.rb (chop_basename, prepend_prefix): use o option.

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/lib/pathname.rb
    trunk/ChangeLog
    trunk/lib/pathname.rb
    trunk/version.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21778)
+++ ChangeLog	(revision 21779)
@@ -1,3 +1,7 @@
+Mon Jan 26 15:49:42 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/pathname.rb (chop_basename, prepend_prefix): use o option.
+
 Sun Jan 25 16:35:44 2009  Tanaka Akira  <akr@f...>
 
 	* ext/socket/socket.c (socket_s_ip_address_list): renamed from
Index: lib/pathname.rb
===================================================================
--- lib/pathname.rb	(revision 21778)
+++ lib/pathname.rb	(revision 21779)
@@ -274,7 +274,7 @@
   # chop_basename(path) -> [pre-basename, basename] or nil
   def chop_basename(path)
     base = File.basename(path)
-    if /\A#{SEPARATOR_PAT}?\z/ =~ base
+    if /\A#{SEPARATOR_PAT}?\z/o =~ base
       return nil
     else
       return path[0, path.rindex(base)], base
@@ -296,7 +296,7 @@
   def prepend_prefix(prefix, relpath)
     if relpath.empty?
       File.dirname(prefix)
-    elsif /#{SEPARATOR_PAT}/ =~ prefix
+    elsif /#{SEPARATOR_PAT}/o =~ prefix
       prefix = File.dirname(prefix)
       prefix = File.join(prefix, "") if File.basename(prefix + 'a') != 'a'
       prefix + relpath
Index: version.h
===================================================================
--- version.h	(revision 21778)
+++ version.h	(revision 21779)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.1"
-#define RUBY_RELEASE_DATE "2009-01-25"
+#define RUBY_RELEASE_DATE "2009-01-26"
 #define RUBY_PATCHLEVEL 5000
 #define RUBY_BRANCH_NAME "trunk"
 
@@ -8,7 +8,7 @@
 #define RUBY_VERSION_TEENY 1
 #define RUBY_RELEASE_YEAR 2009
 #define RUBY_RELEASE_MONTH 1
-#define RUBY_RELEASE_DAY 25
+#define RUBY_RELEASE_DAY 26
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 21778)
+++ ruby_1_8/ChangeLog	(revision 21779)
@@ -1,3 +1,7 @@
+Mon Jan 26 15:49:42 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/pathname.rb (chop_basename, prepend_prefix): use o option.
+
 Mon Jan 26 14:15:00 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* eval.c (Init_Thread): provides "continuation.so" for forward
Index: ruby_1_8/lib/pathname.rb
===================================================================
--- ruby_1_8/lib/pathname.rb	(revision 21778)
+++ ruby_1_8/lib/pathname.rb	(revision 21779)
@@ -263,7 +263,7 @@
   # chop_basename(path) -> [pre-basename, basename] or nil
   def chop_basename(path)
     base = File.basename(path)
-    if /\A#{SEPARATOR_PAT}?\z/ =~ base
+    if /\A#{SEPARATOR_PAT}?\z/o =~ base
       return nil
     else
       return path[0, path.rindex(base)], base
@@ -285,7 +285,7 @@
   def prepend_prefix(prefix, relpath)
     if relpath.empty?
       File.dirname(prefix)
-    elsif /#{SEPARATOR_PAT}/ =~ prefix
+    elsif /#{SEPARATOR_PAT}/o =~ prefix
       prefix = File.dirname(prefix)
       prefix = File.join(prefix, "") if File.basename(prefix + 'a') != 'a'
       prefix + relpath

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]