summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2013-01-13* regparse.c (add_ctype_to_cc): don't check dup warn on addingnaruse
negative ctype to cclass. [Bug #7471] [ruby-core:50344] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-11* insns.def (defineclass): private constants should not be accessedshugo
by scoped module definitions. The bug was introduced in r38495. * test/ruby/test_module.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-10* vm_insnhelper.c (vm_search_super_method): raise a TypeErrorshugo
instead of a NotImplementError if self is not an instance of the current class. [ruby-dev:39772] [Bug #2402] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-09test_flip.rb: flip-flop shared by threadsnobu
* test/ruby/test_flip.rb (TestFlip#test_shared_thread): flip-flop should be separated per threads git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-09Add RUBYOPT=>nil to avoid false negativenaruse
add RUBYOPT=nil to suppress circular require warnings to avoid false negative with stderr assertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-09* test/ruby/test_require.rb: improve test for r38744.glass
fix to use Tempfile instead of temporary file in current directory. the patch is from nobu (Nobuyoshi Nakada). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-09* load.c (load_lock): fix not to delete thread shield twice.glass
it may break the shield locked by another thread. [Bug #7530] [ruby-core:50645] * test/ruby/test_require.rb: a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-08vm_core.h: flip_cnt in rb_iseq_tnobu
* vm_core.h (rb_iseq_t): move flip_cnt from struct iseq_compile_data, because it has same life span as enclosing iseq. [Bug #7671] [ruby-core:51296] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07* vm_method.c (Init_eval_method): main.public and main.privateshugo
should be private. * proc.c (Init_Proc): main.define_method should be private. * test/ruby/test_module.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07* eval.c (Init_eval): main.include should be private.shugo
[ruby-core:51293] [Bug #7670] * test/ruby/test_module.rb (test_top_include_is_private): a new test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07* eval.c (Init_eval): enable Refinements by default.shugo
[ruby-core:51286] [Bug #7667] * eval.c (rb_mod_refine, top_using): show a warning when Module#refine or main.using is called at the first time. * ext/refinement/*: removed the extension library "refinement". * test/ruby/test_refinement.rb: fix for the above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07test_syntax.rb: assert_not_labelnobu
* test/ruby/test_syntax.rb (TestSyntax#assert_not_label): need to eval in the current binding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07parse.y: bare kwrest_marknobu
* parse.y (f_kwrest): allow bare kwrest_mark as valid syntax. its semantics is still undefined. [Bug #7662] [ruby-core:51269] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07parse.y: duplicated kwrest namenobu
* parse.y (f_kwrest): reject duplicated kwrest argument name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07envutil.rb: assert_syntax_errornobu
* test/ruby/envutil.rb (Test::Unit::Assertions#assert_syntax_error): new assertion for syntax error and error message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07envutil.rb: optional fnamenobu
* test/ruby/envutil.rb (Test::Unit::Assertions#assert_valid_syntax): make fname optional for inline source. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07* vm_trace.c (rb_threadptr_exec_event_hooks_orig): pop tag beforeko1
JUMP_TAG() if frame is `finish' frame. Without this patch, there is an inconsistency between control frame stack and tags stack. [Bug #7668] * test/ruby/test_settracefunc.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07vm_insnhelper.c: keyrest should not overwrite rest argnobu
* vm_insnhelper.c (vm_callee_setup_arg_complex, vm_yield_setup_block_args): set keyrest hash after making rest array, so that the last element will not be overwritten. [ruby-core:51278] [Bug #7665] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-05* string.c (rb_str_enumerate_lines): fix invalid byte sequence errorglass
when a separator is passed. The patch is from yoshidam (Yoshida Masato). [Bug #7646] [ruby-dev:46827] * test/ruby/test_string.rb: a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-05envutil.rb: check stdout and stderrnobu
* test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err): check stdout and stderr both. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-31* test/ruby/test_backtrace.rb: Add test for r37957 [Feature #7434]zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-30parse.y: escaped closing parenthsisnobu
* parse.y (simple_re_meta): escaped closing parenthsis has different meaning. [Bug #7610] [ruby-core:51088] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-30* test/ruby/test_keyword.rb: add a test for passing hashktsj
as a last argument. [ruby-dev:46712] [Bug #7529] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-30* vm_insnhelper.c: set keyword hash on Proc/block calls.ktsj
[ruby-core:51172] [Bug #7630] * test/ruby/test_keyword.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-29object.c: singleton class clonenobu
* object.c (rb_obj_clone): attach clone to its singleton class during cloning singleton class so that singleton_method_added will be called on it. based on the patch by shiba (satoshi shiba)[Bug #5283] in [ruby-dev:44477]. [Bug #5283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-29* test/ruby/test_class.rb (test_cannot_reinitialize_class_with_initialize_copy),nobu
(test_invalid_superclass): get rid of confusing ruby-mode.el. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28vm_insnhelper.c: no splat single opt argnobu
* vm_insnhelper.c (vm_yield_setup_block_args): pass single argument to single optional parameter unchanged without splatting. [Bug #7621] [ruby-dev:46801] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28* proc.c (method_eq): fix the documentation to refer to owner.shugo
[ruby-core:51105] [Bug #7613] * test/ruby/test_method.rb (test_alias_onwer): new test to confirm that `a == b' returns false if owners of a and b are different. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-27* variable.c (rb_mod_remove_const): fix segv caused by r38558.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-26Add opts to prevent generating core filenaruse
Given path is a dummy executable file to set as $0, not to read its content. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-25test_rubyoptions.rb: ARGFnobu
* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_segv_test): to read ARGV files is ARGF. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-25Fix argument for assert_in_out_err to fix test failurenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-25* vm_trace.c (rb_threadptr_exec_event_hooks_and_pop_frame):ko1
pop a frame before JUMP_TAG() if exception occurred. This change fix bug of Ruby 1.9. [ruby-core:51128] [ruby-trunk - Bug #7624] * vm_core.h (EXEC_EVENT_HOOK_AND_POP_FRAME): add to use `rb_threadptr_exec_event_hooks_and_pop_frame()'. * vm.c (vm_exec): use EXEC_EVENT_HOOK_AND_POP_FRAME() while exception handling. While exception hadnling, if an exception is raised in hooks, need to pop current frame and raise this raised exception by hook. * test/ruby/test_settracefunc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-25Add test for r38543 [Bug #7597] [ruby-dev:46786]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-25error.c: rb_write_error_strnobu
* error.c (compile_err_append, compile_warn_print, warn_print): use rb_write_error_str() instead of writing to rb_stderr directly. * io.c (rb_write_error_str): a stopgap measure not to unblock GVL. warning from require seems to still have race condition errors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-24scoped constant op-assignmentnobu
* node.h (NODE_OP_CDECL), compile.c (iseq_compile_each), parse.y (stmt, arg): allow scoped constant op-assignment. [ruby-core:40154] [Bug #5449] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-24test_argf.rb: duplicated testnobu
* test/ruby/test_argf.rb (TestArgf#test_lines): remove duplicated test whose content is test_bytes actually. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23* thread.c: rename methods:ko1
from Thread.async_interrupt_timing to Thread.handle_interrupt, from Thread.async_interrupted? to Thread.pending_interrupt?. Also rename option from `defer' to `never'. [ruby-core:51074] [ruby-trunk - Feature #6762] * vm_core.c, thread.c: rename functions and data structure `async_errinfo' to `pending_interrupt'. * thread.c: add global variables sym_immediate, sym_on_blocking and sym_never. * cont.c, process.c, vm.c, signal.c: ditto. * lib/sync.rb, lib/thread.rb: catch up this renaming. * test/ruby/test_thread.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22Deprecate #{lines,bytes,chars,codepoints} of IO-likes.knu
* io.c (rb_io_lines, rb_io_bytes, rb_io_chars, rb_io_codepoints): Deprecate IO#{lines,bytes,chars,codepoints} and those of ARGF. [Feature #6670] * ext/stringio/stringio.c (strio_lines, strio_bytes, strio_chars) (strio_codepoints): Deprecate StringIO#{lines,bytes,chars,codepoints}. [Feature #6670] * ext/zlib/zlib.c (rb_gzreader_lines, rb_gzreader_bytes): Deprecate Zlib::GzipReader#{lines,bytes}. [Feature #6670] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22* include/ruby/intern.h: add the prototype declaration ofmrkn
rb_num_coerce_bit. * numeric.c (rb_num_coerce_bit): the new coerce function for bitwise binary operation. * bignum.c (rb_big_and): use coerce to convert the argument, which isn't a Fixnum nor a Bignum, to the corresponding Integer object so that bitwise operations can support Integer-mimic objects. [Bug #1792] [ruby-core:39491] * bignum.c (rb_big_or): ditto. * bignum.c (rb_big_xor): ditto. * numeric.c (bit_coerce): ditto. * numeric.c (fix_and): ditto. * numeric.c (fix_or): ditto. * numeric.c (fix_xor): ditto. * test/ruby/test_integer.rb: add tests for the above changes. * test/ruby/test_bignum.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22internal.h: quote unprintablenobu
* internal.h (QUOTE, QUOTE_ID): quote unprintable chars in strings and IDs. [Bug #7574] [ruby-dev:46749] * string.c (rb_str_quote_unprintable): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22object.c: no nested symbolnobu
* object.c (rb_mod_const_get): symbol cannot be nested constant name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22object.c: check more strictlynobu
* object.c (rb_mod_const_get): check more strictly. [ruby-dev:46748] [Bug #7573] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22* cont.c (rb_fiber_start): in case of jump with TAG_FATAL,nagachika
enqueue error into async_errinfo_queue, because you cannot call TH_TAG_JUMP() in this function. [ruby-dev:45218] [Bug #5993] * thread.c (rb_threadptr_execute_interrupts): now INT2FIX(TAG_FATAL) can be popped from async_errinfo_queue. * vm.c (rb_vm_make_jump_tag_but_local_jump): revert r38441. rb_vm_make_jump_tag_but_local_jump() shouldn't return exception in case of state == TAG_FATAL. * test/ruby/test_fiber.rb (test_exit_in_fiber): fix a test to illuminate Thread.exit should terminate current Thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22* struct.c (make_struct): remove junk ID check to allow members whoglass
have junk name like "foo\000". * test/ruby/test_struct.rb: Test for above. [Bug #7575] [ruby-dev:46750] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21* test/ruby/test_iseq.rb: disable a test which checks featuresko1
removed at r38532. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21Add test for r38529 [Bug #7536]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21* vm_core.h, vm_trace.c: fix multi-threading bug for tracing.ko1
Move `trace_arg' from rb_tp_t::trace_arg to rb_thread_t::trace_arg. `trace_arg' may changed by multiple threads. rb_thread_t::trace_arg can represent rb_thread_t::trace_running (null or non-null) and rb_thread_t::trace_running is removed. After that, `rb_tp_t' is not needed to check tracing or not (A running thread knows tracing or not). This is why I remove tp_attr_check_active() and make new function get_trace_arg(). And this modification disable to work the following code: TracePoint.trace{|tp| Thread.new{p tp.event} # access `tp' from other threads. } I believe nobody mix threads at trace procedure. This is current limitation. * cont.c (fiber_switch, rb_cont_call): use rb_thread_t::trace_arg instead of rb_thread_t::trace_running. * test/ruby/test_settracefunc.rb: add a multi-threading test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21test_thread.rb: descriptive assertionsnobu
* test/ruby/test_thread.rb: (test_local_barrier), (test_status_and_stop_p, test_recursive_outer, test_stack_size): use more descriptive assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21test_thread.rb: flush before SystemStackErrornobu
* test/ruby/test_thread.rb (TestThread#test_stack_size): need to flush before SystemStackError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e