diff --git a/ChangeLog b/ChangeLog index 129f1e9bfd..e4f65c89a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -333,6 +333,10 @@ Sat Jan 31 01:09:41 2004 NAKAMURA, Hiroshi * lib/logger.rb: leading 0 padding of timestamp usec part. +Fri Jan 30 18:53:23 2004 Yukihiro Matsumoto + + * re.c (KR_REHASH): wrong hash value on sizeof(long) > sizeof(int). + Thu Jan 29 23:11:57 2004 WATANABE Hirofumi * configure.in (DLEXT2): removed. Ruby does not treat diff --git a/lib/cgi.rb b/lib/cgi.rb index 5ec7e6a7b7..5b785bab3a 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -2318,3 +2318,4 @@ class CGI end # class CGI +? diff --git a/lib/find.rb b/lib/find.rb index e94d5c2c70..52efde81fd 100644 --- a/lib/find.rb +++ b/lib/find.rb @@ -36,8 +36,8 @@ module Find paths.collect!{|d| d.dup} while file = paths.shift catch(:prune) do - yield file.dup - file.untaint + next unless File.exist? file + yield file.dup.taint begin if File.lstat(file).directory? then d = Dir.open(file) @@ -51,7 +51,7 @@ module Find else f = File.join(file, f) end - paths.unshift f + paths.unshift f.untaint end ensure d.close diff --git a/lib/mkmf.rb b/lib/mkmf.rb index f9fe4608a3..6315e1f8bf 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -538,6 +538,26 @@ def have_header(header, &b) end end +def find_header(header, *paths) + checking_for header do + if try_cpp(cpp_include(header)) + true + else + found = false + paths.each do |dir| + opt = "-I#{dir}" + if try_cpp(cpp_include(header), opt) + $INCFLAGS += " " + $INCFLAGS += opt + found = true + break + end + end + found + end + end +end + def have_struct_member(type, member, header = nil, &b) checking_for "#{type}.#{member}" do if try_compile(<<"SRC", &b) diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 106668de19..f1762e6b5d 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -222,7 +222,7 @@ Also ignores spaces after parenthesis when 'space." (make-variable-buffer-local 'comment-column) (setq comment-column ruby-comment-column) (make-variable-buffer-local 'comment-start-skip) - (setq comment-start-skip "\\(^\\|\\s-\\);?#+ *") + (setq comment-start-skip "#+ *") (setq indent-tabs-mode ruby-indent-tabs-mode) (make-local-variable 'parse-sexp-ignore-comments) (setq parse-sexp-ignore-comments t) @@ -731,8 +731,10 @@ The variable ruby-indent-level controls the amount of indentation. (not (looking-at ruby-block-hanging-re)) (eq (ruby-deep-indent-paren-p t) 'space) (not (bobp))) - (ruby-beginning-of-arg (or begin parse-start) (point)) - (current-column)) + (save-excursion + (widen) + (ruby-beginning-of-arg (or begin parse-start) (point)) + (current-column))) (t (+ indent ruby-indent-level)))))))) indent))) @@ -802,7 +804,7 @@ An end of a defun is found by moving forward from the beginning of one." ((> start pos) (setq done t))))) (if done - (progn + (save-excursion (back-to-indentation) (if (looking-at ruby-block-mid-re) (setq done nil)))))) diff --git a/re.c b/re.c index c1e5af074d..b2811df14e 100644 --- a/re.c +++ b/re.c @@ -105,7 +105,7 @@ rb_memsearch(x0, m, y0, n) int d; unsigned long hx, hy; -#define KR_REHASH(a, b, h) (((h) << 1) - ((a)< n) return -1; s = y; e = s + n - m;