aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
Commit message (Collapse)AuthorAgeFilesLines
* Revert r35180; the fix break the test. see [ruby-dev:30653]naruse2012-04-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (inspect_enumerator): suppress uninitializednobu2012-04-031-0/+7
| | | | | | | | instance variable warnings. [ruby-dev:45449][Bug #6214] patched by no6v (Nobuhiro IMAI). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_start_with, rb_str_end_with): raise an error ifnobu2012-04-021-4/+18
| | | | | | | 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
* use super in h.defaultnobu2012-03-311-1/+1
| | | | | | | * test/ruby/test_hash.rb (TestHash#test_shift_none): super in singleton default method doesn't cause SystemStackError now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c (hash_default_value): extract from rb_hash_aref(), to benobu2012-03-311-0/+8
| | | | | | | shared with rb_hash_shift(), so that overriding Hash#default will be respected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* misplaced rescuenobu2012-03-311-2/+3
| | | | | | | * test/ruby/test_thread.rb (test_condvar_wait_deadlock_2): fix cleanup code which is never executed because of misplaced rescue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* descriptive assertionsnobu2012-03-301-34/+34
| | | | | | * test/ruby/test_hash.rb: use more descriptive assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* join LocalBarriernobu2012-03-301-1/+2
| | | | | | * test/ruby/lbtest.rb: needs to join the local barrier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/lbtest.rb: print at once including newlines.nobu2012-03-291-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (obj2uid, obj2gid): allow strings as input user/group id.nobu2012-03-281-0/+6
| | | | | | | [ruby-core:40923][Feature #5610] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_symreal): default to ASCII-8BIT for non-ascii symbols,nobu2012-03-281-0/+9
| | | | | | | | otherwise it should be converted to US-ASCII in rb_intern_str() if possible. [ruby-core:43762][Bug #6209] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (str_new_empty): should copy also the encoding as annobu2012-03-271-0/+20
| | | | | | empty substring. [ruby-dev:45441][Bug #6206] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (inspect_enumerator): show method arguments ofshugo2012-03-261-2/+14
| | | | | | lazy enumerators correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file_internal): bail out if the script is a directory.nobu2012-03-261-0/+5
| | | | | | | [Feature #2408][ruby-core:26925] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (tr_setup_table): fix multiple non latin argument fornaruse2012-03-251-0/+7
| | | | | | | non latin (over 256 characters) tr-like methods. [ruby-core:43371] [Bug #6167] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator (lazy_initialize): set the instance variable "receiver"shugo2012-03-241-0/+4
| | | | | | | | | to include the receiver to the return value of inspect on a lazy enumerator directly created by Enumerator::Lazy.new. * enumerator (RETURN_LAZY): don't set the instance variable "receiver". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator (enumerator_inspect): include the original receiver andshugo2012-03-241-0/+12
| | | | | | | | | | | method name of Enumerator::Lazy in the result of inspect. [ruby-core:43345] [Bug #6159] * enumerator (InitVM_Enumerator): don't use rb_define_alias for some methods such as collect in order to make rb_frame_this_func() return the correct method names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_init_1): Time.new will accept seconds as string ornobu2012-03-241-0/+7
| | | | | | int. [ruby-core:43569][Bug #6193] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_str_to_inum): must be ASCII compatible encoding asnobu2012-03-232-0/+14
| | | | | | | 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
* * test/ruby/test_io.rb (try_fdopen): more GCable.nobu2012-03-231-3/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (str_encode_bang, encoded_dup): if nothing wasnobu2012-03-221-0/+8
| | | | | | | transcoded, just set encoding but leave coderange unchanged as forcee_encoding. [ruby-core:43557][Bug #6190] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (static int io_fflush): add the definition.shirosaki2012-03-221-0/+15
| | | | | | | | | | | | | | | | | | Use it in set_binary_mode_with_seek_cur(). * io.c (set_binary_mode_with_seek_cur): refactoring to split the content into io_unread(). Fix the possibility of buffer overflow. * io.c (io_unread): add new implementation for Windows. Previous one caused invalid cursor position using IO#pos with OS text mode. New one fixes the bug. * test/ruby/test_io_m17n.rb (TestIO_M17N#test_pos_dont_move_cursor_position): add a test for above bug. [ruby-core:43497] [Bug #6179] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_m17n.rb (test_env): show failed values.nobu2012-03-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (TestIO#test_pos_with_getc): updated.usa2012-03-221-15/+17
| | | | | | | see [ruby-core:43550] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (TestIO#test_pos_with_getc): added.usa2012-03-211-0/+22
| | | | | | | see [Bug #6179][ruby-core:43518] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_thread: test_condvar_wait_not_owner duplicates test_condvar_nolocknobu2012-03-201-8/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (lazy_flat_map_func): convert the block value toshugo2012-03-191-0/+21
| | | | | | | Array if it doesn't respond to each. [ruby-core:43334] [Bug #6155] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_pow): estimate result bit size more precisely.nobu2012-03-181-0/+3
| | | | | | | [ruby-core:30735][Feature #3429] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (free_method_entry_i): method entry may be innobu2012-03-181-0/+12
| | | | | | | unlinked_method_entry_list. [ruby-core:43383][Bug #6171] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (trnext): fix bug with string ending with '\\'.kazu2012-03-161-0/+3
| | | | | | | | | [ruby-dev:45374][Bug #6160] * test/ruby/test_string.rb (TestString#test_delete): test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (trnext): should advance char-wise.nobu2012-03-161-0/+4
| | | | | | [ruby-core:43335][Bug #6156] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix unreachable warning line numbernobu2012-03-161-0/+7
| | | | | | | * parse.y (block_append_gen): fix unreachable warning line number. should warn at the code, not jump. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typonobu2012-03-161-1/+1
| | | | | | * test/ruby/test_module.rb (test_method_redefinition): fix typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* verbose_warningnobu2012-03-161-1/+1
| | | | | | * test/ruby/envutil.rb (verbose_warning): should not hide execptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warning.nobu2012-03-162-3/+3
| | | | | | | | * test/ruby/envutil.rb: suppress warnings. * test/ruby/test_exception.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix indentnobu2012-03-161-10/+10
| | | | | | * test/ruby/test_exception.rb (test_exception): fix indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Tempfile#opennobu2012-03-161-6/+10
| | | | | | | * test/ruby/test_exception.rb (test_systemexit_new, test_exception_in_exception_equal): use Tempfile#open. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix argument ordernobu2012-03-161-1/+1
| | | | | | | * test/ruby/test_parse.rb (test_void_expr_stmts_value): expected value comes first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bug numbernobu2012-03-161-5/+5
| | | | | | * test/ruby/test_syntax.rb (test_keyword_rest): give the bug number to assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (argument_error): use line number at the beginningnobu2012-03-161-0/+19
| | | | | | | | of lambda, not the first code ob its body. [ruby-core:43314][Bug #6151] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (lazy_take): don't enumerate an extra value.shugo2012-03-161-1/+5
| | | | | | [ruby-dev:45370] [Bug #6152] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (rb_enum_values_pack): rename from enum_values_pack, andshugo2012-03-151-0/+42
| | | | | | | | | | | | | remove static. * enumerator.c (lazy_init_iterator, lazy_init_yielder, lazy_select_func, lazy_reject_func, lazy_grep_func): handle multiple values correctly. * enumerator.c (lazy_grep): change the behavior when a block is given, to be consistent with Enumerable#grep. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (lazy_zip): rescue StopIteration returned byshugo2012-03-151-0/+6
| | | | | | Enumerator#next. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (lazy_zip, lazy_cycle): Enumerator::Lazy#{zip,cycle}shugo2012-03-151-4/+14
| | | | | | | should be eager when a block is given, to be consistent with Enumerable#{zip,cycle}. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (InitVM_Enumerator): renamed Enumerable::Lazy toshugo2012-03-151-1/+1
| | | | | | Enumerator::Lazy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex): fix warning line number.nobu2012-03-151-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_m17n.rb (assert_warning): use common method.nobu2012-03-151-12/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (sym_check_asciionly): check ascii compatibility beforenobu2012-03-151-0/+7
| | | | | | | | | scanning for code range. * parse.y (intern_str): set to us-ascii if ascii only. [ruby-dev:45363][Bug #6146] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (lazy_cycle): add Enumerable::Lazy#cycle.shugo2012-03-151-0/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_arity.rb (TestArity#err_mess): use assert_raise.nobu2012-03-154-7/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e