object.c, string.c, variable.c, vm_macro.def: revert private
instance variable feature, which is postponed until next major
release.
* marshal.c: TYPE_SYMBOL2 removed; MARSHAL_MINOR reverted back to
8th version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
returns a codepoint for the first character in the string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
symbol from a symbol and a class. back-ported from matzruby.
* parse.y (rb_decompose_ivar2): reverse function of
rb_compose_ivar2().
* marshal.c (w_symbol): support class local instance variables.
* marshal.c (r_object0): ditto.
* compile.c (defined_expr): ditto.
* compile.c (iseq_compile_each): ditto.
* insns.def: add two new instructions: getinstancevariable2 and
setinstancevariable2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
before actually modifying the string.
fixed: [ruby-dev:30211] (originally reported by zunda)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_str_upcase_bang, rb_str_downcase_bang, rb_str_swapcase_bang):
add RDoc description that case conversion to be effective only
in ASCII region.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
string, but not the shared string. fixed: [ruby-core:09152]
* strnig.c (rb_str_new4): keep shared string untainted when orignal
string is tainted. fixed: [ruby-dev:29672]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
is given. in other words, lines become an alias to each_line.
[ruby-core:09218]
* string.c (rb_str_each_byte): ditto for bytes in place of lines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
based on the patch from Eric Mahurin <eric_mahurin at yahoo.com>.
[ruby-core:05861]
* array.c (rb_ary_unshift_m): ditto.
* array.c (ary_make_shared): ditto.
* array.c (RESIZE_CAPA): ditto.
* array.c (rb_ary_free): new function to free memory. code moved
from gc.c.
* string.c (rb_str_free): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
starts with given prefix.
* string.c (rb_str_endwith): the opposite of String#startwith?.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
by a separator. taken from Python 2.5.
* string.c (rb_str_rpartition): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (sym_hash): cache hash value in aux.shared if possible.
* gc.c (rb_obj_id): no need to treat symbols specially.
* lib/fileutils.rb (FileUtils::FileUtils): singleton_methods() no
longer return an array of strings, but of symbols.
* lib/delegate.rb (DelegateClass): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
level is greater than zero. [ruby-core:08862]
* parse.y (rb_interned_p): new function to check if a string is
already interned.
* string.c (str_to_id): use rb_str_intern().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (Init_String): Symbol as subclass of String.
* parse.y (rb_intern2): handle symbol as strings.
* string.c (str_new): substring of symbols are mere strings, not
symbols.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(RARRAY_LEN): defined for accessing array members.
(RARRAY_PTR): ditto.
* array.c: use RARRAY_LEN and RARRAY_PTR.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
malloc'ed buffer. a patch from <nobu at ruby-lang.org> in
[ruby-dev:29369]. fixed: [ruby-dev:29368]
* string.c (rb_str_ord): use %ld specifier since STRING_LEN() is a
long. [ruby-dev:29369]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(RSTRING_LEN): defined for accessing string members.
(RSTRING_PTR): ditto.
* string.c: use RSTRING_LEN and RSTRING_PTR.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_memhash): new generic function to calculate hash value
for memory chunk.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e