summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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* vm.c (oldbt_init, vm_backtrace_str_ary): arg->data shouldko1
be initialized before calling `backtrace_each()'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25* trunk/ext/-test-/printf/printf.c: change function names because ofusa
conflict with msvcrt. fixed build error of mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35789 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-24* enum.c (enum_count): Enumerable#count no longer uses #size whendrbrain
counting elements. Patch by Nobuhiro IMAI. [ruby-trunk - Bug #6473] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24sprintf.c: inspect by plusnobu
* sprintf.c (ruby__sfvextra): [EXPERIMENTAL] use inspect instead of to_s if plus flag is given. * vsnprintf.c (BSD_vfprintf): pass sign flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24* 2012-05-25svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35778 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-24Feature #5896nobu
* vsnprintf.c (BSD_vfprintf): [EXPERIMENTAL] object representation in rb_enc_vsprintf(). [Feature #5896] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24vm.c: marshal compatibilitynobu
* vm.c (Init_VM): fix marshal compatibility of backtrace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24vm.c: fix typonobu
* vm.c (Init_VM): fix typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24vm.c: rb_typeddata_is_kind_ofnobu
* vm.c (rb_backtrace_p): use rb_typeddata_is_kind_of(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24vm_eval.c: fix typesnobu
* vm_eval.c (rb_backtrace_struct, backtreace_collect): use size_t instead of int to get rid of overflow. * vm_eval.c (backtrace_object, vm_backtrace_each): ditto, use ptrdiff_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24vm.c: suppress 64-to-32 warningsnobu
* vm.c (backtrace_object): suppress 64-to-32 warnings. should adjust types. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24* vm_method.c (rb_method_defined_by): removed.ko1
nobu pointed out that rb_method_basic_definition_p() is enough for last commit. * error.c, eval_error.c: change for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35770 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-24Fix wrong filename: enc/shift_jis.c -> string.c (r35724).naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-24* 2012-05-24svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35767 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-23Ignore extconf.rb generated mkmf.logdrbrain
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35765 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-23use RB_TYPE_P() instead of comparison of TYPE()nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23* win32/win32.c (finish_overlapped_socket, overlapped_socket_io):usa
replace ECONNABORTED to EPIPE in send, sendto and sendmsg to improve BSD socket compatibility. this change removes a failure on the test of net/ftp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-22* lib/net/http.rb: Broke up Net::HTTP into individual files.drbrain
[ruby-trunk - Feature #6435] * lib/net/http/backward.rb: ditto. * lib/net/http/response.rb: ditto. * lib/net/http/exceptions.rb: ditto. * lib/net/http/responses.rb: ditto. * lib/net/http/generic_request.rb: ditto. * lib/net/http/header.rb: ditto. * lib/net/http/request.rb: ditto. * lib/net/http/proxy_delta.rb: ditto. * lib/net/http/requests.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-22* 2012-05-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35760 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-22remove trailing spacesnobu
* vm_core.h (rb_iseq_struct): remove trailing spaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35758 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-22* vm_core.h: add a data type rb_location_t to store iseq locationko1
information. rb_location_t#filename, filepath, name and line_no was moved from rb_iseq_t. rb_location_t#basename is a new field which is similar to `name' field without any decoration. `name' field contains some decoration such as `block in foo'. `basename' only contains `foo'. rb_iseq_t contains memory object of rb_location_t. * iseq.c: setup rb_location_t for each rb_iseq_t memory objects. * compile.c, proc.c, vm.c, vm_dump.c, vm_eval.c, vm_insnhelper.c, vm_method.c: support about it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21* 2012-05-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21* struct.c (rb_struct_members): Refactoring. As Struct#members hadmame
returned an array of String, the old code was needed to convert Symbols to Strings. But it is almost unnecessary because the method now returns an array of Symbols. A patch by Masaki Matsushita <glass.saga at gmail dot com> [Feature #6218] [ruby-dev:45451] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35753 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-21lib/test/unit.rb: not override job_status optionnobu
* lib/test/unit.rb (Test::Unit::Runner#_prepare_run): not override job_status option if no tty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21* ext/syslog/syslog.c: Classify constants and macros into severalknu
sub-modules. (Syslog::Priority, Syslog::Level, Syslog::Option and Syslog::Macros) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21* ext/syslog/syslog.c (mSyslog_inspect): Use rb_sprintf().knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21* ext/syslog/syslog.c (mSyslog_inspect): Make sure self is aknu
module before calling rb_class2name(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21lib/test/unit.rb: simple ouput if verbosenobu
* lib/test/unit.rb (Test::Unit::Runner#_prepare_run): use simple output if verbose mode and no job-status option given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21 * .travis.yml (install): It seems tcl/tk is skipped in Travisshyouhei
CI. Trying to fix the situation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21enc: fix dependenciesnobu
* enc/depend (ENCOBJS): add dependencies. * enc/make_encmake.rb (target_encodings): extract dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35734 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-20ext/extmk.rb: workaround for -framework optionnobu
* ext/extmk.rb (extmake): assume non-option words are arguments. workaround for -framework option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20* 2012-05-21svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20lib/test/unit.rb: not overwrite options itselfnobu
* lib/test/unit.rb (Test::Unit::Runner#_prepare_run): not overwrite options itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20* ChangeLog: fix a typo.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20ext/extmk.rb: reopen stdoutnobu
* ext/extmk.rb (extmake): reopen $stdout to NULL, since setting $stdout cannot affect child processes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e