1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* re.c (rb_reg_search): should set regs.allocated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2002-02-01 06:01:51 +00:00
parent e198d0e5cb
commit 859ed608bc
4 changed files with 11 additions and 3 deletions

View file

@ -5,6 +5,10 @@ Thu Jan 31 20:45:33 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* lib/mkmf.rb (arg_config): avoid special variables for
font-lock-mode.
Wed Jan 30 13:37:05 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
* re.c (rb_reg_search): should set regs.allocated.
Mon Jan 28 18:33:18 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* parse.y (yylex): strict check for numbers.

2
eval.c
View file

@ -6784,7 +6784,7 @@ umethod_bind(method, recv)
method = Data_Make_Struct(rb_cMethod,struct METHOD,bm_mark,free,bound);
*bound = *data;
bound->recv = recv;
bound->klass = CLASS_OF(recv);
bound->oklass = CLASS_OF(recv);
return method;
}

View file

@ -15,7 +15,7 @@
;;; for example :
;;;
;;; (autoload 'ruby-mode "ruby-mode"
;;; "Mode for editing ruby source files")
;;; "Mode for editing ruby source files" t)
;;; (setq auto-mode-alist
;;; (append '(("\\.rb$" . ruby-mode)) auto-mode-alist))
;;; (setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
@ -35,6 +35,9 @@
;;; HISTORY
;;; senda - 8 Apr 1998: Created.
;;; $Log$
;;; Revision 1.3.2.1 2002/02/01 06:01:51 matz
;;; * re.c (rb_reg_search): should set regs.allocated.
;;;
;;; Revision 1.3 1999/12/01 09:24:18 matz
;;; 19991201
;;;

1
re.c
View file

@ -611,6 +611,7 @@ rb_reg_search(re, str, pos, reverse)
else {
range = RSTRING(str)->len - pos;
}
regs.allocated = 0;
result = re_search(RREGEXP(re)->ptr,RSTRING(str)->ptr,RSTRING(str)->len,
pos, range, &regs);