summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog17
-rw-r--r--lib/jcode.rb13
-rw-r--r--lib/pstore.rb1
-rw-r--r--marshal.c2
-rw-r--r--parse.y6
-rw-r--r--sample/mrshtest.rb1
-rw-r--r--signal.c2
7 files changed, 29 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 29dcb9c0f..fd439fde2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,27 @@
-Mon Sep 18 17:46:11 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Tue Sep 19 16:53:06 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* stable version 1.6.0 released.
+Tue Sep 19 16:24:52 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * marshal.c (Init_marshal): provide marshal.so no more.
+
Tue Sep 19 14:01:01 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * configure.in: include version number in RUBY_SO_NAME.
+
* configure.in, win32/setup.mak: include version number
in RUBY_SO_NAME.
+Tue Sep 19 13:07:47 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * parse.y (yylex): was confusing $~ and $_.
+
+Tue Sep 19 13:06:53 2000 GOTOU YUUZOU <gotoyuzo@notwork.org>
+
+ * signal.c (rb_f_kill): signum may be a negative number, should be
+ treated by signed number.
+
Tue Sep 19 01:14:56 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_provide): better feature handling.
diff --git a/lib/jcode.rb b/lib/jcode.rb
index 923153a63..77aedaa3b 100644
--- a/lib/jcode.rb
+++ b/lib/jcode.rb
@@ -4,6 +4,11 @@ $vsave, $VERBOSE = $VERBOSE, false
class String
printf STDERR, "feel free for some warnings:\n" if $VERBOSE
+ def _regex_quote(str)
+ a = str.gsub(/\W/){|s| if s == "-" then s else "\\\\#{s}" end}
+ end
+ private :_regex_quote
+
PATTERN_SJIS = '[\x81-\x9f\xe0-\xef][\x40-\x7e\x80-\xfc]'
PATTERN_EUC = '[\xa1-\xfe][\xa1-\xfe]'
PATTERN_UTF8 = '[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]'
@@ -118,7 +123,7 @@ class String
def tr!(from, to)
return self.delete!(from) if to.length == 0
- pattern = TrPatternCache[from] ||= /[#{Regexp::quote(from)}]/
+ pattern = TrPatternCache[from] ||= /[#{_regex_quote(from)}]/
if from[0] == ?^
last = /.$/.match(to)[0]
self.gsub!(pattern, last)
@@ -133,7 +138,7 @@ class String
end
def delete!(del)
- self.gsub!(DeletePatternCache[del] ||= /[#{Regexp::quote(del)}]+/, '')
+ self.gsub!(DeletePatternCache[del] ||= /[#{_regex_quote(del)}]+/, '')
end
def delete(del)
@@ -143,7 +148,7 @@ class String
def squeeze!(del=nil)
pattern =
if del
- SqueezePatternCache[del] ||= /([#{Regexp::quote(del)}])\1+/
+ SqueezePatternCache[del] ||= /([#{_regex_quote(del)}])\1+/
else
/(.|\n)\1+/
end
@@ -157,7 +162,7 @@ class String
def tr_s!(from, to)
return self.delete!(from) if to.length == 0
- pattern = SqueezePatternCache[from] ||= /([#{Regexp::quote(from)}])\1+"/ #"
+ pattern = SqueezePatternCache[from] ||= /([#{_regex_quote(from)}])\1+"/
if from[0] == ?^
last = /.$/.match(to)[0]
self.gsub!(pattern, last)
diff --git a/lib/pstore.rb b/lib/pstore.rb
index 409fc6dfc..5eadd6830 100644
--- a/lib/pstore.rb
+++ b/lib/pstore.rb
@@ -12,7 +12,6 @@
# p db["root"]
# end
-require "marshal"
require "ftools"
class PStore
diff --git a/marshal.c b/marshal.c
index f4342c06b..f0ae1f5d0 100644
--- a/marshal.c
+++ b/marshal.c
@@ -996,6 +996,4 @@ Init_marshal()
rb_define_module_function(rb_mMarshal, "dump", marshal_dump, -1);
rb_define_module_function(rb_mMarshal, "load", marshal_load, -1);
rb_define_module_function(rb_mMarshal, "restore", marshal_load, -1);
-
- rb_provide("marshal.so"); /* for backward compatibility */
}
diff --git a/parse.y b/parse.y
index 39ac6f6f6..cf0687609 100644
--- a/parse.y
+++ b/parse.y
@@ -3398,8 +3398,6 @@ yylex()
newtok();
c = nextc();
switch (c) {
- case '~': /* $~: match-data */
- /* fall through */
case '_': /* $_: last read line string */
c = nextc();
if (is_identchar(c)) {
@@ -3409,7 +3407,9 @@ yylex()
}
pushback(c);
c = '_';
- local_cnt('_');
+ /* fall through */
+ case '~': /* $~: match-data */
+ local_cnt(c);
/* fall through */
case '*': /* $*: argv */
case '$': /* $$: pid */
diff --git a/sample/mrshtest.rb b/sample/mrshtest.rb
index 402b35ad5..8d2dc9936 100644
--- a/sample/mrshtest.rb
+++ b/sample/mrshtest.rb
@@ -1,4 +1,3 @@
-require "marshal"
include Marshal
a = 25.6;
pt = Struct.new('Point', :x,:y);
diff --git a/signal.c b/signal.c
index f6149ace5..f98a0b3d7 100644
--- a/signal.c
+++ b/signal.c
@@ -205,7 +205,7 @@ rb_f_kill(argc, argv)
rb_raise(rb_eArgError, "wrong # of arguments -- kill(sig, pid...)");
switch (TYPE(argv[0])) {
case T_FIXNUM:
- sig = FIX2UINT(argv[0]);
+ sig = FIX2INT(argv[0]);
break;
case T_SYMBOL: