1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/include/ruby
akr 340cd503a7 * include/ruby/ruby.h (struct RRegexp): new field usecnt. replace
str and len by src.

* gc.c (gc_mark_children): mark src field of regexp.
  (obj_free): don't free str field.

* re.c (REG_BUSY): removed.
  (rb_reg_initialize): prohibit re-initialize regexp.
  (rb_reg_search): use usecnt to prevent freeing regexp currently
  using.  this prevents SEGV by:
    r = /\A((a.)*(a.)*)*b/
    r =~ "ab" + "\xc2\xa1".force_encoding("euc-jp")
    t = Thread.new { r =~ "ab"*8 + "\xc2\xa1".force_encoding("utf-8")}
    sleep 0.2
    r =~ "ab"*8 + "\xc2\xa1".force_encoding("euc-jp")



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28 12:25:45 +00:00
..
defines.h * file.c (file_expand_path): support for alternative data stream 2008-05-15 06:34:02 +00:00
encoding.h * encoding.c (rb_filesystem_encoding): defined. 2008-06-16 21:28:03 +00:00
intern.h * include/ruby/intern.h (rb_str_new2, rb_tainted_str_new2, 2008-06-28 12:15:55 +00:00
io.h
missing.h * include/ruby/missing.h (cbrt): add declaration. 2008-03-06 05:06:30 +00:00
mvm.h * vm_core.h (struct rb_vm_struct): moved ruby_debug, ruby_verbose, and 2008-06-09 05:18:03 +00:00
node.h * include/ruby/node.h: add new constants for rb_call()'s scope. 2008-04-01 21:30:36 +00:00
oniguruma.h
re.h * include/ruby/re.h (struct rmatch_offset): new struct for character 2008-02-16 20:08:35 +00:00
regex.h
ruby.h * include/ruby/ruby.h (struct RRegexp): new field usecnt. replace 2008-06-28 12:25:45 +00:00
signal.h
st.h
util.h * debug.c (ruby_set_debug_option): separated ruby_each_words(). 2008-02-23 21:13:05 +00:00
win32.h * include/ruby/win32.h, win32/win32.c (rb_w32_getppid): now support 2008-06-24 02:14:00 +00:00