summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2015-12-13* object.c (rb_inspect): check the default internal encoding asshugo
String#inspect do. [ruby-dev:49415] [Bug #11787] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-12* lib/ostruct.rb: Have OpenStruct#dig raise if argument is not a symbolmarcandre
nor a string. See [#11762] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-12* vm_insnhelper.c (vm_call_method_missing): method_missing shouldshugo
not be refined. [ruby-core:72080] [Bug #11809] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-12object.c: raise TypeErrornobu
* object.c (rb_obj_dig): raise TypeError if an element does not have #dig method. [ruby-core:71798] [Bug #11762] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-12* test/ruby/test_regexp.rb: Add test cases for `$KCODE` and `$=` warningyui-knk
[Misc #11770][ruby-dev:49398] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-12test_thread.rb: stay alivenobu
* test/ruby/test_thread.rb (test_thread_name): the target thread needs to stay alive till the end of this test, so that inspected result would not change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-11IO#advise should not raise Errno::ENOSYSnormal
As it is just a hint the kernel is free to ignore, IO#advise already succeeds when posix_fadvise is not available build time at all. Following that, if posix_fadvise was available at build time but not implemented in the running kernel, we should also ignore it. * io.c (do_io_advise): do not raise on ENOSYS * test/ruby/test_io.rb (test_advise): do not skip on Errno::ENOSYS (test_advise_pipe): ditto [ruby-core:72066] [Feature #11806] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-11enc/windows_1252.c: newnobu
* enc/windows_1252.c: separate from ISO-8859-1 to fix 0x80..0x9e range. [ruby-core:64049] [Bug #10097] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-11insns.def (opt_case_dispatch): avoid converting Infinitynormal
Infinity cannot be written as an optimizable literal, so it can never match a key in a CDHASH. Avoid converting it to prevent FloatDomainError. * insns.def (opt_case_dispatch): avoid converting Infinity * test/ruby/test_optimization.rb (test_opt_case_dispatch_inf): new [ruby-dev:49423] [Bug #11804] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-11test_ssl.rb: fix ssl option flags testsnobu
* test/openssl/test_ssl.rb (test_setting_twice): ignore fixed flags. some flags like SSL_OP_NO_SSL_MASK cannot change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-11test_io.rb: fix IO#advise on aarch64-linuxnobu
* test/ruby/test_io.rb (test_advise, test_advise_pipe): fadvise on aarch64-linux returns ESYS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-11* lib/rubygems: Update to RubyGems 2.5.1hsbt
* test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-10* object.c (rb_inspect): dump inspected result with rb_str_escape()naruse
instead of raising Encoding::CompatibilityError. [Feature #11801] * string.c (rb_str_escape): added to dump given string like rb_str_inspect without quotes and always dump in US-ASCII like rb_str_dump. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-10* test/ruby/test_gc.rb (test_expand_heap): relax condition (1->2).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09fix r53013; the environment defines "example" as local hostnamenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09TestIO_Console.rb: disable getpass test by --excludesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09add tests for El Capitan failurenaruse
http://rubyci.s3.amazonaws.com/osx1011/ruby-trunk/log/20151209T174501Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09test_rubyoptions.rb: test --debugnobu
* test/ruby/test_rubyoptions.rb (test_frozen_string_literal_debug): test --debug option too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09test_ssl.rb: fix ssl option flags testsnobu
* test/openssl/test_ssl.rb (test_setting_twice): ignore fixed falgs. some flags like SSL_OP_NO_SSL_MASK cannot change. * test/openssl/test_ssl.rb (test_options_setting_nil_means_all): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09* compile.c (iseq_compile_each): do not add debug informationko1
without --debug or --debug=frozen-string-literal option because String#dup slows down with debug information. [Feature #11725] * NEWS: apply about it. * test/ruby/test_rubyoptions.rb: catch up this fix with refactoring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09* iseq.c: rename methodsko1
RubyVM::InstructionSequence#to_binary_format -> #to_binary RubyVM::InstructionSequence.from_binary_format -> .load_from_binary RubyVM::InstructionSequence.from_binary_format_extra_data -> .load_from_binary_extra_data * iseq.c: fix document of iseq.to_binary. [Fix GH-1134] * sample/iseq_loader.rb: catch up this change. * test/lib/iseq_loader_checker.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09test_io_console.rb: skipnobu
* test/io/console/test_io_console.rb (test_getpass): skip for the time being. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09test_io_console.rb: waitnobu
* test/io/console/test_io_console.rb (test_getpass): wait for the child process to read the input, not to read it by the master itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09test_io_console.rb: ignore echo backnobu
* test/io/console/test_io_console.rb (test_getpass): ignore echo back of input from the master side. some systems seem echo back but other may not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09* vm.c (rb_vm_cref_in_context): Module#define_method in non-classko1
expression should be public. [Bug #11754] * test/ruby/test_method.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09* test/net/smtp/test_response.rb: use Test::Unit. We should use Test::Unithsbt
without rubygems and rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08test_generic.rb: fix assertionnobu
* test/uri/test_generic.rb (test_to_s): use assert_not_predicate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08test/uri/test_generic.rb (to_s): new testnormal
Ensure URI::Generic#to_s continues to return mutable strings to prevent breakage when we enable frozen string literals in future commits. [ruby-core:71820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08* string.c (rb_str_init): now accepts new option parameter `encoding'.usa
[Feature #11785] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08envutil.rb: improve messagenobu
* test/lib/envutil.rb (assert_ruby_status): show also outputs at normal exit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08* test/io/console/test_io_console.rb (run_pty): Avoid waiting twicengoto
for a process. Fix Errno::ECHILD in TestIO_Console#test_close and TestIO_Console#test_sync. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08* introduce new ISeq binary format serializer/de-serializerko1
and a pre-compilation/runtime loader sample. [Feature #11788] * iseq.c: add new methods: * RubyVM::InstructionSequence#to_binary_format(extra_data = nil) * RubyVM::InstructionSequence.from_binary_format(binary) * RubyVM::InstructionSequence.from_binary_format_extra_data(binary) * compile.c: implement body of this new feature. * load.c (rb_load_internal0), iseq.c (rb_iseq_load_iseq): call RubyVM::InstructionSequence.load_iseq(fname) with loading script name if this method is defined. We can return any ISeq object as a result value. Otherwise loading will be continue as usual. This interface is not matured and is not extensible. So that we don't guarantee the future compatibility of this method. Basically, you should'nt use this method. * iseq.h: move ISEQ_MAJOR/MINOR_VERSION (and some definitions) from iseq.c. * encoding.c (rb_data_is_encoding), internal.h: added. * vm_core.h: add several supports for lazy load. * add USE_LAZY_LOAD macro to specify enable or disable of this feature. * add several fields to rb_iseq_t. * introduce new macro rb_iseq_check(). * insns.def: some check for lazy loading feature. * vm_insnhelper.c: ditto. * proc.c: ditto. * vm.c: ditto. * test/lib/iseq_loader_checker.rb: enabled iff suitable environment variables are provided. * test/runner.rb: enable lib/iseq_loader_checker.rb. * sample/iseq_loader.rb: add sample compiler and loader. $ ruby sample/iseq_loader.rb [dir] will compile all ruby scripts in [dir]. With default setting, this compile creates *.rb.yarb files in same directory of target .rb scripts. $ ruby -r sample/iseq_loader.rb [app] will run with enable to load compiled binary data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08retry IO#getpassnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08Revert r52902,r52903,r52910,r52911,r52937,r52939naruse
Reject IO::Console#getpass because it can't test portablly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08enumerator.c: lazy_grep_vnobu
* enumerator.c (lazy_grep_v): add Enumerator::Lazy#grep_v as well as Enumerable, to enumerate lazily. [ruby-core:71845] [Feature #11773] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08error.c: name_err_local_variablesnobu
* error.c (name_err_local_variables): new method NameError#local_variables for internal use only. [Feature #11777] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08* array.c: Improve and fix documentation for Array#digmarcandre
[#11776] * hash.c: ditto * struct.c: ditto * test_hash.rb: Add basic test for user defined `dig`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08marshal.c: skip internal namesnobu
* marshal.c (w_objivar): skip internal instance variables in T_OBJECT too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08test_io_console.rb: separate master and slavenobu
* test/io/console/test_io_console.rb (test_getpass): separate master side and slave side in each threads. r52937 deadlocked on OS X. [Bug #11780] [ruby-dev:49412] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08* test/io/console/test_io_console.rb (test_getpass): s.getpassngoto
should be tested. Narrow ensure block. This reverts r52911. [Bug #11780] [ruby-dev:49412] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08compile optimized case dispatch for nil/true/falsenormal
nil/true/false are special literals just like floats, integers, literal strings, and symbols. Optimize when statements with them by using a jump table, too. target 0: a (ruby 2.3.0dev (2015-12-08 trunk 52928) [x86_64-linux]) at "/home/ew/rrrr/b/ruby" target 1: b (ruby 2.3.0dev (2015-12-08 master 52928) [x86_64-linux]) at "/home/ew/ruby/b/ruby" benchmark results: minimum results in each 5 measurements. Execution time (sec) name a b loop_whileloop2 0.102 0.103 vm2_case_lit* 1.657 0.549 Speedup ratio: compare with the result of `a' (greater is better) name b loop_whileloop2 0.988 vm2_case_lit* 3.017 * benchmark/bm_vm2_case_lit.rb: new benchmark * compile.c (case_when_optimizable_literal): add nil/true/false * insns.def (opt_case_dispatch): ditto * vm.c (vm_redefinition_check_flag): ditto * vm.c (vm_init_redefined_flag): ditto * vm_core.h: ditto * object.c (InitVM_Object): define === explicitly for nil/true/false * test/ruby/test_case.rb (test_deoptimize_nil): new test * test/ruby/test_optimization.rb (test_opt_case_dispatch): update (test_eqq): new test [ruby-core:71923] [Feature #11769] Original patch by Aaron Patterson <tenderlove@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07insns.def (opt_case_dispatch): check Float#=== redefinitionnormal
The missing check for Float#=== redefinition was noticed while working on enhancing optimized case dispatch for nil/true/false in [ruby-core:71818] https://bugs.ruby-lang.org/issues/11769 So no, I don't normally redefine core classes like this :P * insns.def (opt_case_dispatch): check Float#=== redefinition * test/ruby/test_optimization.rb (test_opt_case_dispatch): new [ruby-core:71920] [Bug #11784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07* test/lib/iseq_loader_checker.rb: add iseq dumper/loader checker.ko1
If you enable this checker (remove `#' in test/runner.rb), you can see comparison results between an original iseq disassembed result and dumped and loaded iseq disassembed result. There are several bugs around there, because of inexact stack depth calculation. Now, I leave these bugs because they are not critical and difficult to solve completely. * test/runner.rb: require test/lib/iseq_loader_checker.rb but disabled at default (commented out). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07socket: expand docs+tests for recv_io/send_ionormal
* ext/socket/unixsocket.c (unix_send_io): document args (unix_recv_io): ditto * test/socket/test_unix.rb (test_fd_passing_class_mode): added I was working on these when I encountered the problem in with BasicSocket.for_fd not handling mode args: https://bugs.ruby-lang.org/issues/11778 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07* ext/psych/*: update psych to 2.0.16tenderlove
* test/psych/*: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07* string.c: introduce String#+@ and String#-@ to controlko1
String mutability. [Feature #11782] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07parse.y: indented hereocnobu
* parse.y: add heredoc <<~ syntax. [Feature #9098] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07temporally remove prompt to pass the testnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06test_io_console.rb: waitnobu
* test/io/console/test_io_console.rb (test_getpass): wait slave thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06* test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): gave up the testusa
of binary path info test on Windows because the test had passed occasionally as the comment said. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e