summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2012-05-27* untabified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27modified test.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26file.c: fix for UNCnobu
* file.c (realpath_rec): UNC prefix does not end with path separator, so new separator is needed after it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26test/ruby/test_file.rb: fix for UNCnobu
* test/ruby/test_file.rb (test_realpath, test_realdirpath): fix for UNC enabled platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26* test/ruby/test_backtrace.rb (test_caller_lev):ko1
decreaze recursion size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26* vm.c (RubyVM::FrameInfo): add a class to access each frameko1
information. You don't need to parse strings from caller(). FrameInfo has the following methods: FrameInfo#name: method name, class name, etc with decorations. FrameInfo#basename: name without decorations. FrameInfo#line_no: line number. FrameInfo#filename: file name. FrameInfo#filepath: full filepath. FrameInfo#iseq: iseq if it is iseq frame (defined by ruby script) FrameInfo#to_s: return caller() method style string. RubyVM::FrameInfoFrameInfo.caller(n, lev) returns array of FrameInfo objects. The name "RubyVM::FrameInfoFrameInfo.caller" is long and ambiguous (same as caller() method), we need to change the name before Ruby 2.0 release. Good names or comments are welcome. * test/ruby/test_backtrace.rb: add a test for above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26* ext/openssl/ossl_ssl.c: Allow disabling client-side renegotiation.emboss
* test/openssl/test_ssl.rb: Simple tests for this. Client-side renegotiation is still considered problematic, even when used in the context of secure renegotiation (RI, RFC 5746). The changes allow users to either completely disable client renegotiation on the server, or to specify a maximum number of handshakes allowed in total. The number of total handshakes is counted in a callback set as SSL_set_info_callback. If the maximum number of handshakes is exceeded an error will be raised We do not support renegotiation in the OpenSSL extension, therefore this feature can only be tested externally. The feature is opt-in, the default setting will be to allow unlimited client renegotiation, as was the case before. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25* test/openssl/test_ssl.rb: Clarify the intention of errors to beemboss
expected. Two errors are possible when connection is refused due to a protocol version that was explicitly disallowed, OpenSSL::SSL::SSLError or Errno::ECONNRESET, depending on the OpenSSL version in use. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25* ext/openssl/ossl_ssl.c: Revert r35583emboss
* test/openssl/test_ssl.rb: Handle ECONNRESET in code instead to avoid the test failing in Ruby CI [1] [1] http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T190102Z.log.html.gz#test-all git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25* vm_eval.c (rb_f_caller): caller() method accepts second optionalko1
argument `n' which specify how many frames should return. For example, `caller(0, 1)' returns only one frame information which calls caller() method. If there are less than n frame information, then all frame information are returned. If n is 0, then always return []. This fix is part of [ruby-dev:42345] [Ruby 1.9-Feature#3917]. However, performance and features are not enough. RDoc is also not available. * test/ruby/test_backtrace.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25* properties.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25* vm.c: refactoring backtrace related funcitons.ko1
(1) unify similar functions (rb_backtrace_each() and backtrace_object()). backtrace_each() is a unified function. variation: a) backtrace_object(): create backtrace object. b) vm_backtrace_str_ary(): create bt as an array of string. c) vm_backtrace_print(): print backtrace to specified file. d) rb_backtrace_print_as_bugreport(): print backtrace on bugreport style. (2) remove rb_backtrace_each(). Use backtrace_each() instead. (3) chang the type of lev parameter to size_t. a) lev == 0 means current frame (exception, etc use it). b) lev == 1 means upper frame (caller(0) use it). * vm_core.h, vm_dump.c, vm_eval.c: ditto. * vm.c (backtrace_object(), vm_backtrace_str_ary()): fix to return a correct size of caller(lev) array. Let n be a "caller(0).size" then ln as caller(lev).size should be (n - lev). However, the previous implementation returns a wrong size array (ln > n - lev). [ruby-dev:45673] * test/ruby/test_backtrace.rb: add tests for backtrace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25* test/-ext-/test_printf.rb: tests for [Feature #5896].nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24Bug #5348nobu
* test/rubygems/test_gem_indexer.rb (setup, teardown): save @tempdir to remove it properly. [Bug #5348] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24* vm.c: add RubyVM::Backtrace object (btobj).ko1
Backtrace information contains an array consists of location information for each frames by string. RubyVM::Backtrace object is lightweight backtrace information, which contains complete information to generate traditional style backtrace (an array of strings) with faster generation. If someone accesses to backtrace information via Exception#backtrace, then convert a RubyVM::Backtrace object to traditonal style backtrace. This change causes incompatibility on marshal dumpped binary of Exception. If you have any trouble on it, please tell us before Ruby 2.0 release. Note that RubyVM::Backtrace object should not expose Ruby level. * error.c, eval.c, vm_eval.c: ditto. * internal.h: ditto. * eval_error.c: fix to skip "set_backtrace" method invocation in creating an exception object if it call a normal set_backtrace method (defined by core). * test/ruby/test_settracefunc.rb: fix for above change. * vm_method.c (rb_method_defined_by): added. This function checks that the given object responds with the given method by the given cfunc. * benchmark/bm_vm2_raise1.rb, benchmark/bm_vm2_raise2.rb: add to measure exception creation speed. raise1 create exception objects from shallow stack frame. raise2 create exception objects from deep stack frame. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24Bug #6487nobu
* io.c (io_strip_bom): check EOF. [Bug #6487][ruby-core:45203] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23* lib/net/http/header.rb (Net::HTTPHeader#range): fix broken parser ofnaruse
HTTP Range request. Old one can't parse invalid specs and multiple specs correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-22* class.c (rb_mod_init_copy): Clear the cached inspect string of adrbrain
dup'd anonymous module or class. [ruby-trunk - Bug #6454] * test/ruby/test_module.rb (class TestModule): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-22rescue EPIPE raised from conn.print because of client's timeoutnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21OpenSSL 1.0.1 pre-beta disabled TLS v1.2 by default.naruse
http://cvs.openssl.org/chngview?cn=21471 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21* lib/net/ftp.rb (Net::FTP#retrbinary): close only if conn is not nilnaruse
because transfercmd may fail and return nil. * lib/net/ftp.rb (Net::FTP#retrlines): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21Rescue exception from writing to a socket.naruse
conn.print may raise EPIPE because ftp.retrbinary closes the connection because of read_timeout. but the exact result varies from the situation like platform, timing, and so on. it may raise ECONNRESET, ECONNABORTED, EOFError, or nothing raised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21* lib/net/ftp.rb (Net::FTP#transfercmd): rescue shutdown.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20Shutdown gracefully.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20* enc/shift_jis.c (code_to_mbclen): returnnaruse
ONIGERR_INVALID_CODE_POINT_VALUE if the code is invalid. * enc/shift_jis.c (tr_next): increment character until the code is a valid character. [ruby-dev:45652] [Bug #6450] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18* lib/uri/generic.rb (URI::Generic.build): duplicate args before addingnaruse
new items. (don't change arguments) * lib/uri/generic.rb (URI::Generic.build): use URI::Generic::COMPONENT if this method is called from URI::Generic. * lib/uri/generic.rb (URI::Generic.build2): escape only if the item is a String. * lib/uri/generic.rb (URI::Generic.build2): use DEFAULT_PARSER because it doesn't have parser method. [Bug #6420] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-17* ext/syslog/lib/syslog/logger.rb: Added Syslog::Logger which wasdrbrain
ported from the SyslogLogger gem. [ruby-trunk - Feature #5096] * NEWS: ditto. * test/syslog/test_syslog_logger.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15test/ruby/test_time.rb: split a big testnobu
* test/ruby/test_time.rb (TestTime#test_strftime): split a big test by subjects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15 * ext/date/date_strftime.c: should also be aware of flags ontadf
complex specifier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15* ext/psych/lib/psych/visitors/to_ruby.rb: fix a bug with stringtenderlove
subclass dumping and loading. * test/psych/test_array.rb: pertinent tests * test/psych/test_string.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15* ext/psych/lib/psych/visitors/to_ruby.rb: convert omap tagged maps totenderlove
Psych::Omap objects rather than hashes. [Bug #6425] * test/psych/test_omap.rb: pertinent test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15test for Bug #6385nobu
* test/ruby/test_file.rb (TestFile#test_utime): test for [Bug #6385]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15test/ruby/test_file.rb: use tmpdirnobu
* test/ruby/test_file.rb (TestFile#test_utime): Dir.mktmpdir does not chdir. * test/ruby/test_file.rb (TestFile#test_file_open_permissions): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15test/ruby/test_marshal.rb: close pipesnobu
* test/ruby/test_marshal.rb (TestMarshal#test_pipe): should close pipes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-14Check IFDISABLED on Mac OS X.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-14Bug #6403: reset states after empty argsnobu
* parse.y (f_arglist): should reset lexical states after empty argument list with no parenthesis as well as parenthesized list, so that reserved name method definition work. [ruby-dev:45626] [Bug #6403] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13* enumerator.c (lazy_take_func, lazy_take): multiple calls ofnagachika
force/to_a method to Enumerator::Lazy#take should return same results. [ruby-dev:45634] [Bug #6428] * test/ruby/test_lazy_enumerator.rb (test_take_recycle): add test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13* test/ruby/test_io.rb (test_flush_in_finalizer1): don't use IO.for_fdnagachika
to close IO objects. it create IO object with already closed fd, and cause occasional Errno::EBADF in following tests. [ruby-core:45020] [Bug #6228] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13* test/ruby/test_io.rb (TestIO): revert r35631. it broke the intent ofnagachika
test_flush_in_finalizer1. [ruby-core:43951] [Bug ##6228] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-12* test/ruby/test_io.rb (class TestIO): Disable GC during IO tests toluislavena
avoid file descriptors being GC'ed. Suggestion by Tomoyuki Chikanaga [ruby-core:43951][Bug #6228] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11Revert r35622.naruse
It breaks bootstraptest/test_exception.rb:388. "* thread.c (rb_threadptr_execute_interrupts_common): th->errinfo is" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11* thread.c (rb_threadptr_execute_interrupts_common): th->errinfo isnaruse
not Fixnum, but exception object. This causes test_signal_requiring of test/ruby/test_signal.rb fail if the sub process is killed on waiting IO in lex_io_gets in require itself, not sleep. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11Add a test: BigDecimal("0").div(BigDecimal("Infinity")).naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11Bug #6419: fix cmdarg beginnobu
* parse.y (primary): begin/end block should be isolated from outside. [ruby-dev:45631][Bug #6419] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10adding a few tests surrounding file open argumentstenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10fix the path of ifconfig.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10skip addresses whose interface is set as POINTOPOINT.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10Skip IPv6 addresses whose interface is set as IFDISABLED.naruse
FreeBSD 9.0 with default setting (ipv6_activate_all_interfaces is not YES) sets IFDISABLED to interfaces which don't have global IPv6 address. Link-local IPv6 addresses on those interfaces don't work. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-10test/minitest: Correct requiring path to metametameta.rb.nobu
* test/minitest/test_minitest_mock.rb: Correct requiring path to metametameta.rb. * test/minitest/test_minitest_unit.rb: Correct requiring path to metametameta.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-09* lib/net/imap.rb (decode_utf7, encode_utf7): refactored byshugo
Nobuyoshi Nakada, to use String#encode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e