summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--file.c2
-rw-r--r--version.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e74101333..ef7356fa4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,6 @@
-Tue Jul 3 19:18:27 2012 NARUSE, Yui <naruse@ruby-lang.org>
+Tue Jul 3 19:37:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * file.c (rmext): no extension to strip if empty string.
* proc.c (rb_vm_rewrite_dfp_in_errinfo): Fix `unexpected return'
occurs when a proc is called in ensure. [Backport #6460]
diff --git a/file.c b/file.c
index a8c621a99d..a21687eaf7 100644
--- a/file.c
+++ b/file.c
@@ -3522,7 +3522,7 @@ rmext(const char *p, long l0, long l1, const char *e, long l2, rb_encoding *enc)
unsigned int c;
const char *s, *last;
- if (!e) return 0;
+ if (!e || !l2) return 0;
c = rb_enc_codepoint_len(e, e + l2, &len1, enc);
if (rb_enc_ascget(e + len1, e + l2, &len2, enc) == '*' && len1 + len2 == l2) {
diff --git a/version.h b/version.h
index d3815de2a8..bc6f4f346d 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 248
+#define RUBY_PATCHLEVEL 249
#define RUBY_RELEASE_DATE "2012-07-03"
#define RUBY_RELEASE_YEAR 2012