summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--lib/shell/command-processor.rb2
-rw-r--r--missing.h4
-rw-r--r--mkconfig.rb2
-rw-r--r--string.c10
5 files changed, 21 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index e632ba5219..3c26ca8ab6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,10 +2,19 @@ Tue Aug 5 17:58:57 2003 WATANABE Hirofumi <eban@ruby-lang.org>
* lib/fileutils.rb (install): should preserve timestamp only.
+Tue Aug 5 17:31:59 2003 Ian Macdonald <ian@caliban.org>
+
+ * lib/shell/command-processor.rb (Shell::CommandProcessor::rmdir):
+ simple typo.
+
Tue Aug 5 15:47:34 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_load): should preserve current source file/line.
+Tue Aug 5 10:04:42 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * string.c (str_new4): ptr may refer null_str.
+
Mon Aug 4 17:25:18 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* stable version 1.8.0 released.
diff --git a/lib/shell/command-processor.rb b/lib/shell/command-processor.rb
index 07879567fd..876192e8b1 100644
--- a/lib/shell/command-processor.rb
+++ b/lib/shell/command-processor.rb
@@ -205,7 +205,7 @@ class Shell
#
def rmdir(*path)
for dir in path
- Dir.rmdir(expand_path(path))
+ Dir.rmdir(expand_path(dir))
end
end
diff --git a/missing.h b/missing.h
index 0603db1a40..133f1fc687 100644
--- a/missing.h
+++ b/missing.h
@@ -128,8 +128,8 @@ extern unsigned long strtoul _((char *, char **, int));
# else
# include <varargs.h>
# endif
-extern snprintf __((char *, size_t n, char const *, ...));
-extern vsnprintf _((char *, size_t n, char const *, va_list));
+extern int snprintf __((char *, size_t n, char const *, ...));
+extern int vsnprintf _((char *, size_t n, char const *, va_list));
#endif
#endif /* MISSING_H */
diff --git a/mkconfig.rb b/mkconfig.rb
index b697dfb9d1..b0abee35ad 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -45,7 +45,7 @@ File.foreach "config.status" do |line|
next if $install_name and /^RUBY_INSTALL_NAME$/ =~ name
next if $so_name and /^RUBY_SO_NAME$/ =~ name
v = " CONFIG[\"" + name + "\"] = " +
- val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1?"$(#{$1})":$&}.dump + "\n"
+ val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump + "\n"
if fast[name]
v_fast << v
else
diff --git a/string.c b/string.c
index ae157f474e..248813e233 100644
--- a/string.c
+++ b/string.c
@@ -144,8 +144,14 @@ str_new4(klass, str)
RSTRING(str2)->len = RSTRING(str)->len;
RSTRING(str2)->ptr = RSTRING(str)->ptr;
- RSTRING(str)->aux.shared = str2;
- FL_SET(str, ELTS_SHARED);
+ if (FL_TEST(str, ELTS_SHARED) && !RSTRING(str)->aux.shared) {
+ /* ptr should be null_str */
+ FL_SET(str2, ELTS_SHARED);
+ }
+ else {
+ FL_SET(str, ELTS_SHARED);
+ RSTRING(str)->aux.shared = str2;
+ }
OBJ_INFECT(str2, str);
return str2;