diff options
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | lib/jcode.rb | 13 | ||||
-rw-r--r-- | lib/pstore.rb | 1 | ||||
-rw-r--r-- | marshal.c | 2 | ||||
-rw-r--r-- | parse.y | 6 | ||||
-rw-r--r-- | sample/mrshtest.rb | 1 | ||||
-rw-r--r-- | signal.c | 2 |
7 files changed, 29 insertions, 13 deletions
@@ -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 @@ -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 */ } @@ -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); @@ -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: |