aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* * insns.def (splatarray): make new array if flag is set.nobu2012-02-151-1/+6
| | | | | | | | * compile.c (iseq_compile_each): make new array with splat. [ruby-core:21901][Feature #1125] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (rb_fiber_reset_root_local_storage): add a new function tonagachika2012-02-151-0/+16
| | | | | | | | | | | | | | | | | | | | | | | restore rb_thread_t::local_storage. * cont.c (rb_obj_is_fiber): add a new function to tell finalizer to prevent fibers from destroy. * gc.c (rb_objspace_call_finalizer): don't sweep fibers at finalizing objspace. * internal.h (rb_fiber_reset_root_local_storage, rb_obj_is_fiber): add prototypes. * vm.c (ruby_vm_destruct): reset main thread's local_storage before free main thread. rb_thread_t::local_storage is replaced by fiber's local storage when forked from fiber, and it should be already freed when the fiber was destroyed. * test/ruby/test_fiber.rb (test_fork_from_fiber): add test for fork from fiber. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/fiddle/closure.c (callback): same as r34506.nobu2012-02-151-0/+25
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add test for r34624.naruse2012-02-151-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Set encoding as ASCII-8BIT. [Bug #6027]naruse2012-02-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_method.c (rb_method_boundp):knu2012-02-131-2/+2
| | | | | | | | | | | | obj.respond_to?(:a_protected_method) should return false because calling a protected method may cause NoMethodError if called from outside the class inheritance tree. Kernel#respond_to? is mostly used to test if it is safe to call a method, so the false positive should be avoided. [ruby-dev:40461] [ruby-dev:41739] [ruby-dev:41837] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_setstrbuf): defer resizing buffer string until data isnobu2012-02-131-4/+26
| | | | | | read actually. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_eval.c (check_funcall): Call respond_to? with matching arity fordrbrain2012-02-111-0/+14
| | | | | | | legacy single-argument implementations. [ruby-trunk - Bug #6000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (defined_expr): guard the whole expression.nobu2012-02-111-0/+12
| | | | | | [ruby-dev:45021][Bug#5786] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (rb_inflate_add_dictionary): Addeddrbrain2012-02-111-0/+17
| | | | | | | | Zlib::Inflate#add_dictionary to allow users to pre-specify for using during #inflate. [ruby-trunk - Feature #5937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (do_inflate): Inflate more data if buffered datadrbrain2012-02-111-0/+23
| | | | | | | | exists. Allows Zlib::Inflate#set_dictionary to work. [ruby-trunk - Bug #5929] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/parser.c: removed external encoding setter, allow parsertenderlove2012-02-091-9/+6
| | | | | | | | to be reused. * ext/psych/lib/psych/parser.rb: added external encoding setter. * test/psych/test_parser.rb: test parser reuse git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/envutil.rb (assert_no_memory_leak): new assertion tonobu2012-02-092-17/+25
| | | | | | | | check memory leak by invoking child ruby process and watch its memory size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/pathname/test_pathname.rb (test_binread): add assertion tonagachika2012-02-091-1/+3
| | | | | | check encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/memory_status.rb (Memory::Win32): 64bit support.usa2012-02-091-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/pathname/test_pathname.rb: not read but binread.naruse2012-02-081-1/+1
| | | | | | patched by Benoit Daloze, [ruby-core:42440] [Bug #5984] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* FreeBSD needs multiple -o.naruse2012-02-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/-ext-/string/test_modify_expand.rb: test for r34492.nobu2012-02-082-0/+121
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix condition.naruse2012-02-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* "street" for X509 Name is not supported before 0.9.8m.naruse2012-02-081-9/+28
| | | | | | | It is added openssl/crypto/objects/obj_mac.h 1.83. http://cvs.openssl.org/rlog?f=openssl/crypto/objects/obj_mac.h git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_ssl.c: Add SSL constants and allow to unset SSLnahi2012-02-081-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | option to prevent BEAST attack. See [Bug #5353]. In OpenSSL, OP_DONT_INSERT_EMPTY_FRAGMENTS is used to prevent TLS-CBC-IV vulunerability described at http://www.openssl.org/~bodo/tls-cbc.txt It's known issue of TLSv1/SSLv3 but it attracts lots of attention these days as BEAST attack. (CVE-2011-3389) Until now ossl sets OP_ALL at SSLContext allocation and call SSL_CTX_set_options at connection. SSL_CTX_set_options updates the value by using |= so bits set by OP_ALL cannot be unset afterwards. This commit changes to call SSL_CTX_set_options only 1 time for each SSLContext. It sets the specified value if SSLContext#options= are called and sets OP_ALL if not. To help users to unset bits in OP_ALL, this commit also adds several constant to SSL such as OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS. These constants were not exposed in Ruby because there's no way to unset bits in OP_ALL before. Following is an example to enable 0/n split for BEAST prevention. ctx.options = OP_ALL & ~OP_DONT_INSERT_EMPTY_FRAGMENTS * test/openssl/test_ssl.rb: Test above option exists. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_x509name.c: Use the numerical representation ofemboss2012-02-081-0/+51
| | | | | | | | | | | | unrecognized OIDs instead of the sn "UNDEF". * test/openssl/test_x509name.rb: Add tests for the fixed behavior. Patch provided by Paul Kehrer, thanḱ you! [ruby-core:41769] [Feature #5787] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * st.c (st_update): table can be unpacked in the callback.nobu2012-02-071-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * st.c (st_foreach): should not yield same pair when checkingnobu2012-02-071-0/+21
| | | | | | | after unpacking. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_compatible): return ASCII-8BIT even if 2nd stringnaruse2012-02-051-0/+3
| | | | | | is ascii only string. [ruby-core:42354] [Bug #5968] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/net/http/test_https_proxy.rbkazu2012-02-022-0/+12
| | | | | | | | | | | (HTTPSProxyTest#test_https_proxy_authentication): add workaround to avoid to hang up without openssl. see #5786 * test/resolv/test_dns.rb (TestResolvDNS#test_query_ipv4_address): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/parsers/baseparser.rb, test/rexml/test_namespace.rb:kou2012-02-021-0/+38
| | | | | | | | fix the default xml namespace URI validation. Reported by Miho Hiramatsu. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_next_argv): reset ARGF.next_p on ARGV.replace.naruse2012-02-021-0/+10
| | | | | | | r34409 breaks replacing ARGV. [ruby-dev:45160] [Bug #5952] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/net/http/test_http.rb (TestNetHTTPKeepAlive#*): remove debugusa2012-02-021-2/+0
| | | | | | | output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_argf.rb (test_readlines_twice_tty): removed incomplete test ↵nobu2012-02-011-15/+0
| | | | | | committed accidentally. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_close): skip stdin, which should be readable again.nobu2012-01-311-0/+20
| | | | | | | | [ruby-dev:45160] [Bug #5952] * io.c (argf_readlines): reinitialize after all read to be readable again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_thread.rb ↵nobu2012-01-311-12/+15
| | | | | | (TestThreadGroup#test_thread_timer_and_interrupt): suppress interrupt message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/envutil.rb (EnvUtil.invoke_ruby): yield also child pidnobu2012-01-311-1/+1
| | | | | | in block form. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_eval.c (vm_call0): should pass block to enumerators. patchednobu2012-01-301-0/+51
| | | | | | | | | by Kazuki Tsujimoto. [ruby-dev:44961][Bug #5731] * vm_eval.c (method_missing), vm_insnhelper.c (vm_call_method): ditto. patched by satoshi shiba. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/readline/test_readline.rb (test_completion_encoding): test on more ↵nobu2012-01-301-11/+27
| | | | | | locales. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/irb/test_completion.rb: skip if cannot load irb/completionusa2012-01-301-8/+13
| | | | | | | (maybe readline does not exist). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Skip test if locale is not Japanese nor UTF-8.naruse2012-01-291-3/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/readline/readline.c (readline_attempted_completion_function):nobu2012-01-291-0/+35
| | | | | | | respect encodings. [Bug #5941] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_thread.rbshirosaki2012-01-281-3/+8
| | | | | | | | | | | | | | | (TestThreadGroup#test_thread_timer_and_interrupt): skip exit status assertion because we cannot get signal status on Windows. * win32/win32.c (CreateChild): create process group to receive the signal by GenerateConsoleCtrlEvent(). * win32/win32.c (kill): use CTRL_BREAK_EVENT instead of CTRL_C_EVENT if a process group is specified. CTRL_C_EVENT signal cannot be generated for process groups for the specification. [ruby-dev:45149] [Bug #5812] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/zlib/test_zlib.rb (TestZlibGzipReader#test_reader_wrap): setshirosaki2012-01-281-0/+1
| | | | | | | | binmode explicitly for fixing test error on Windows. This is consistent with r34243. [ruby-dev:45149] [Bug #5812] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/completion.rb (IRB::InputCompletor::CompletionProc):nobu2012-01-271-0/+17
| | | | | | | ignore non-string name modules. [ruby-core:42244][Bug #5938] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/io/console/console.c (io_getch): default delegating methodnobu2012-01-251-2/+10
| | | | | | | | for StringIO. https://github.com/nobu/io-console/issues/4 * ext/stringio/stringio.c: moved some methods to hidden modules. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_basename): ignore non-ascii extension innobu2012-01-251-0/+3
| | | | | | | different encoding, which cannot match. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_enc_path_next, rb_enc_path_skip_prefix)nobu2012-01-252-8/+44
| | | | | | | | | | | | | | | (rb_enc_path_last_separator, rb_enc_path_end) (ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware path handling functions. * file.c (rb_home_dir, file_expand_path, rb_realpath_internal) (rb_file_s_basename, rb_file_dirname, rb_file_s_extname) (rb_file_join): should respect the encodings of arguments than file system encoding. [ruby-dev:45145] [Bug #5919] * dir.c (check_dirname, ruby_glob0): ditto. * ext/pathname/pathname.c (path_sub_ext): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (rb_iter_break_value): new function to break a block withnobu2012-01-241-0/+9
| | | | | | the value. [ruby-dev:45132] [Feature #5895] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_Hash): trivial optimization.nobu2012-01-241-4/+4
| | | | | | | * test/ruby/test_object.rb (TestObject#test_convert_hash): fix arguments order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_Hash): add Kernel#Hash conversion method likematz2012-01-241-0/+13
| | | | | | Array() or Float(). a patch from Run Paint Run Run. Fix #3131 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Additional test for r34358.naruse2012-01-241-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/mailto.rb (URI::MailTo.build): follow Array#to_s change ofnaruse2012-01-231-0/+10
| | | | | | Ruby 1.9; use Array#join. [Bug #5840] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (extract_binmode): raise an exception if binmode/textmodenaruse2012-01-231-0/+25
| | | | | | | is specified with both vmode and opthash. [ruby-core:42199] [Bug #5918] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e