should close over the current refinements.
[ruby-dev:46345] [Bug #7261]
* vm_eval.c (rb_call0, rb_search_method_entry,
rb_funcall_passing_block_with_refinements): add a new argument
`refinements' for the above changes.
* test/ruby/test_refinement.rb: related test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Clarify behavior for captured strings and local variable assignment
Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c, vm_insnhelper.c, vm_method.c: use RB_TYPE_P() and
BUILTIN_TYPE() if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
replacement operation. Minor cleanup of markup. [Bug #6719]
* string.c (rb_str_sub_bang): Minor wording change for clarity, minor
cleanup of markup.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_new_frozen): since the result object should have
same tainted/untrusted bits with the original object, return new
object if the shared object unmatch. [ruby-core:39745][Bug #5374]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
index positioning. [Bug #6680]
* array.c (rb_ary_aset): ditto. Reordered sentences for clarity.
* string.c (rb_str_aref_m): Added a description of the behavior of
index positioning
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
starting index is an index into the array or string. Updated
examples to show behavior of indexes at the end of an array or
string. Based on patch by Marcus Stollsteimer. [Bug #6680]
* array.c (rb_ary_aset): ditto.
* string.c (rb_str_aref): ditto. Also added descriptive argument
names to call-seq section.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_subpos): split from rb_str_substr. returns
adjusted position for substring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_symname_p): new function that checks if the string
is valid as a symbol name. split from sym_inspect().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to match other String method examples. [ruby-trunk - Bug #6553]
* string.c (rb_str_end_with): Updated end_with? to use code markup
instead of italic.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
the condition 'ptr_a8 && str_cr != ENC_CODERANGE_7BIT' means not
unknown, str is also ASCII-8BIT because str_encindex == ptr_encindex,
and nont (str_cr == ENC_CODERANGE_UNKNOWN) and
str_cr != ENC_CODERANGE_7BIT means str_cr is valid because ASCII-8BIT
can't be broken. [ruby-dev:45688] [Bug #6509]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ONIGERR_INVALID_CODE_POINT_VALUE if the code is invalid.
* enc/shift_jis.c (tr_next): increment character until the code
is a valid character. [ruby-dev:45652] [Bug #6450]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
an argument is not convertible to a String.
[ruby-core:40623][Bug #5536]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
well as String#hex and String#oct. [ruby-core:43566][Bug #6192]
* string.c (rb_must_asciicompat): check if ASCII compatible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
function is system dependent. Reviewed by nobu, thanks to
@takai.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to fix compile error with Fujitsu C Compiler 5.6 on Solaris 10
on Sparc. [Bug #5878] [ruby-dev:45123]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
is invalid. [Feature #5855] [Bug #5863] [Bug #5864]
* string.c (rb_str_concat): ditto.
* string.c (rb_str_concat): set encoding as ASCII-8BIT when the string
is US-ASCII and the argument is an integer greater than 127.
* regenc.c (onigenc_mb2_code_to_mbclen): rearrange error code.
* enc/euc_jp.c (code_to_mbclen): ditto.
* enc/shift_jis.c (code_to_mbclen): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
bug appears only when single-byte-optimization is disabled due
to unknown coderange. [ruby-core:41896] [Bug #5836]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_str_aref_m with a range. It returns nil when the beginning of
the range is greater than the end of the string rather than the range.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
String#end_with?. fixes#4652
patched by Andrew Grimm <andrew.j.grimm at gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e