summaryrefslogtreecommitdiffstats
path: root/test/ruby
Commit message (Collapse)AuthorAgeFilesLines
...
* * string.c (rb_str_upto): make next object before yield its block.naruse2009-11-031-0/+11
| | | | | | | fix: can modify original begin string of String#upto. [ruby-dev:26384] [ruby-dev:39626] #2327 git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_enum.rb (test_count): marked as an implementationnobu2009-10-301-8/+10
| | | | | | | specific test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_eval.c (vm_call0, vm_call_super, rb_f_send, rb_f_public_send):nobu2009-10-301-0/+25
| | | | | | | fixed call_type. [ruby-dev:39581] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_eval.c (rb_search_method_emtry, rb_method_call_status): splitnobu2009-10-303-2/+26
| | | | | | | | | | | | from rb_call0(). * vm_eval.c (rb_check_funcall): get rid of raising exceptions and hiding further exceptions. [ruby-dev:39584] * vm_eval.c (rb_funcall_no_recursive): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_enum.rb (test_count): test for [ruby-core:24794].nobu2009-10-301-0/+9
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_gb18030.rb (test_left_adjust_char_head):nobu2009-10-291-26/+27
| | | | | | | String#chop no longer raises ArgumentError. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_to_ary): do not use #respond_to? to detectmatz2009-10-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to_ary. Just call. [ruby-core:23738] * eval.c (rb_check_funcall): new function with method existence check. returns Qundef when the method does not exist. * enumerator.c (enumerator_rewind): just call method, using rb_check_funcall(). [ruby-core:23738] * error.c (exc_equal): ditto. * object.c (convert_type): ditto. * error.c (rb_name_err_mesg_new): export function. * eval.c (make_exception): ditto. * io.c (pop_last_hash): return early when the last argument is nil. * io.c (rb_io_puts): treat T_STRING specially for small optimization. * vm_eval.c (raise_method_missing): skip method call if possible using rb_method_basic_definition_p(). * vm_eval.c (method_missing): ditto. * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_debug): test suites changed to ignore exceptions caused by just-call policy. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (get_filesystem_encoding): removed.naruse2009-10-281-0/+2
| | | | | | | | | | | | | | | | | * encoding.c (rb_locale_encindex): added. * encoding.c (rb_filesystem_encindex): added. * encoding.c (rb_filesystem_encindex): add an alias 'filesystem'. [ruby-dev:39574] * encoding.c (enc_find): add rdoc about special aliases. * gem_prelude.rb (Gem.set_home): use Encoding.find('filesystem'). * gem_prelude.rb (Gem.set_paths): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (chopped_length): get rid of unexpected exception.nobu2009-10-271-9/+0
| | | | | | | see [ruby-core:26336]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_fwrite): adjust stdio file position after direct write onnobu2009-10-261-0/+15
| | | | | | | BSDish platforms. [ruby-core:26300] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_class_new): move class check to rb_check_inheritable().matz2009-10-231-2/+1
| | | | | | | * class.c (rb_check_inheritable): should not allow subclass of class Class. [ruby-core:26225] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/envutil.rb (assert_in_out_err): test_stdout andakr2009-10-222-3/+3
| | | | | | | | | | test_stderr should be an array. * test/ruby/test_rubyoptions.rb (test_notfound): test_stdin of assert_in_out_err should be a string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/{marshaltestlib,test_marshal}.rb: suppressed warnings.nobu2009-10-212-4/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (prepare_iseq_build, rb_iseq_build_for_ruby2cext):nobu2009-10-191-0/+4
| | | | | | | untrust mark array. [ruby-core:26137] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Retry until the signal is trapped.naruse2009-10-181-1/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (id2encidx): register encoding name.nobu2009-10-171-0/+43
| | | | | | | | (r_object0): register object before encoding name. [ruby-core:24882] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_thread.rb (test_status_and_stop_p): reduce the risknobu2009-10-161-4/+2
| | | | | | | of race condition. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_object.rb (test_respond_to_missing):nobu2009-10-161-1/+1
| | | | | | | respond_to_missing? should accept two arguments. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_object.rb (test_remove_method): test for Bug#2202.nobu2009-10-161-0/+20
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_encoding_set): get rid of parsing non-ascii string, andnobu2009-10-151-21/+20
| | | | | | | refine messages for invalid name encoding. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_reopen): unread current buffer before telling thenobu2009-10-151-0/+9
| | | | | | | position, for the case of reopening same file. [ruby-dev:39479] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (process_options): script name should not be shown in annobu2009-10-141-0/+9
| | | | | | | error message before loaded. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_regexp.rb (TestRegexp#test_parse_kg): suppressnobu2009-10-121-1/+1
| | | | | | | warnings while tests. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (has_encoding): added for check the regexpnaruse2009-10-111-1/+5
| | | | | | | | is dumped by 1.8 or 1.9. * marshal.c (r_object0): use has_encoding. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/enc-unicode.rb: parse range notation of UnicodeData.txt.naruse2009-10-081-0/+1
| | | | | | | | * enc/unicode/name2ctype.h, enc/unicode/name2ctype.h.blt, enc/unicode/name2ctype.kwd, enc/unicode/name2ctype.src: follow above change. [ruby-dev:39444] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (struct {dump,load}_arg): manage with dfree, insteadnobu2009-10-041-0/+41
| | | | | | | | of using local variable which may be moved by context switch. [ruby-dev:39425] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add assertion message.akr2009-10-041-2/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_method.c (rb_add_method_def): no redefinition warning onnobu2009-10-032-1/+17
| | | | | | | undef. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_f_integer): now Integer() takes optional basematz2009-10-031-0/+13
| | | | | | | | | | argument. base will be ignored for non string values. suggested by Sam Carr at RubyFoo Lounge at London. * test/ruby/test_integer.rb (TestInteger#test_Integer): test updated. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_slice_before): take a pattern if no block given.akr2009-10-021-0/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_method.c (rb_add_method_def): show the location wherenobu2009-09-302-0/+8
| | | | | | | overwritten method was defined. [ruby-dev:39400] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Escape as \x{XXXX} other than Unicode chars.naruse2009-09-291-2/+2
| | | | | | | * string.c (rb_str_inspect): escape as \x{XXXX} when the encoding is other than Unicode. [ruby-dev:39388] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_class.rb (test_method_redefinition): commit miss.nobu2009-09-291-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_{class,module}.rb (test_method_redefinition): includenobu2009-09-292-2/+32
| | | | | | | warned line number. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_{class,module}.rb (test_method_redefinition): refined.nobu2009-09-293-20/+71
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_module.rb: suppress warnings.nobu2009-09-291-4/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_method.c (rb_add_method_def): nothing to do if old method hadnobu2009-09-291-0/+8
| | | | | | | same definition. [ruby-dev:39397] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_class.rb (test_module_function): tests for warnings.nobu2009-09-291-0/+27
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Refine tests arround String#inspect.naruse2009-09-291-35/+12
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_inspect): dump as \uXXXX when thenaruse2009-09-291-24/+33
| | | | | | string is in Unicode. [ruby-dev:39388] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25129 ↵matz2009-09-281-0/+3
| | | | b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (missing_wrap): reverted.nobu2009-09-251-0/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (mnew): fix for instance method of Module, BasicObjectnobu2009-09-251-2/+13
| | | | | | | | | and subclass of a class which overrides respond_to_missing?. based on a patch from Nikolai Lugovoi <nlugovoi AT gmail.com> in [ruby-core:25748]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (mnew): generate method object that wraps method_missing,matz2009-09-241-0/+33
| | | | | | | | | when #respond_to_missing? is defined. * test/ruby/test_object.rb (test_respond_to_missing): add test suites for #respond_to_missing? changes. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (assign_in_cond): also should warn assignment to dvar innobu2009-09-231-2/+22
| | | | | | | conditional. [ruby-dev:39363] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_upto): keep first width. [ruby-dev:39361]nobu2009-09-232-0/+14
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_chunk): new method Enumerable#chunk.akr2009-09-221-0/+70
| | | | | | | | * enum.c (enum_slice_before): new method Enumerable#slice_before. [ruby-dev:38392] [ruby-dev:39240] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (proc_binding): allow proc from method. [ruby-core:25589]nobu2009-09-211-0/+1
| | | | | | | * vm.c (collect_local_variables_in_env): block iseq can be NULL. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (GlobPathValue), file.c (rb_get_path_check): path namesnobu2009-09-192-0/+19
| | | | | | | must be ASCII compatible. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): entry regexp object before its encodingnobu2009-09-181-0/+8
| | | | | | | name. [ruby-core:25625] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e