Граф коммитов

26156 Коммитов

Автор SHA1 Сообщение Дата
nobu 68bf309945 * ext/-test-/win32/dln/extconf.rb: remove unnecessary local variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-17 04:17:05 +00:00
svn cc433788de * 2012-04-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-17 04:11:22 +00:00
nobu dad31f6e50 * dln.c (rb_w32_check_imported): skip ordinal entries. based on a
patch by phasis68 (Heesob Park) at [ruby-core:44381].
  [ruby-core:44371][Bug #6303]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-17 04:11:17 +00:00
nobu 6655667d73 * dln.c (rb_w32_check_imported): skip ordinal entries. patched by
phasis68 (Heesob Park) at [ruby-core:44381].  [Bug #6303]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 12:25:29 +00:00
naruse e0e479fbc5 * spec/default.mspec: expand relative path for ruby_exe which uses
them with Dir.chdir; it breaks relative paths, for example
  core/kernel/exec_spec.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 09:23:50 +00:00
nobu f2979f3101 * win32/win32.c (gmtime_r, localtime_r): POSIX compliant reentrant
versions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 07:22:43 +00:00
nobu 72fffe5cee * configure.in (RUBY_MSVCRT_VERSION): define on mingw too.
* win32/Makefile.sub (config.h): prefix RT_VER with RUBY and make
  more descriptive to get rid of potential conflict.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 07:08:27 +00:00
nobu 8b25f42046 * configure.in (NO_RUBY_VENDOR_LIB): fix missing comma.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 06:19:46 +00:00
usa 7d84f55f3e * ChangeLog: typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 03:22:05 +00:00
marcandre b62792e540 * lib/matrix.rb (hermitian?): Bug fix, patch by George Koehler
[Bug #6290] [rubyspec:4b9573d7613]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 03:17:45 +00:00
marcandre fc7676fcd6 * hash.c: Alias ENV.to_h to ENV.to_hash [ref #6276]
[rubyspec:6587eead7cd1]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 03:16:40 +00:00
marcandre db66739c7c * lib/ostruct.rb: Add OpenStruct#to_h [Feature #6276]
[ref #1400] [rubyspec:9e0250b2fc6f]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 03:16:25 +00:00
marcandre 1dbe0f0672 * struct.c: Add Struct#to_h [Feature #6276]
[ref #4862] [rubyspec:2082ef46d46e]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 03:16:10 +00:00
marcandre 33399fe824 * object.c: Add NilClass#to_h [Feature #6276]
[ref #5008] [rubyspec:dc5ecddbd608]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 03:15:56 +00:00
marcandre f92be2c01a * hash.c: Add Hash#to_h [Feature #6276]
[rubyspec:84b7fe3f24d2]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 03:15:42 +00:00
svn 0c7163ae5e * 2012-04-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 00:44:52 +00:00
usa e6882349c0 * lib/rubygems/remote_fetcher.rb (Gem::RemoteFetcher#download): should
use File.identical? to chech the identicality of the files.
  this fixed an error of a test on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 00:44:47 +00:00
naruse 164ced04de Add debug prints to inspect TC_JSONGenerate#test_gc's timeout issue.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-15 07:37:45 +00:00
nobu 57fb219905 * reduce UNREACHABLE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-15 00:06:13 +00:00
svn b860144680 * 2012-04-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14 18:56:16 +00:00
naruse 05af801f4c Adds another timeouts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14 18:56:12 +00:00
nobu d2e2b309e8 * configure.in (UNREACHABLE): gcc 4.4 eliminates unreachable code
if -O3 is given.
* win32/win32.c (child_result): dropped colon.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14 03:55:06 +00:00
naruse c26ea74ad6 * lib/webrick/server.rb (WEBrick::GenericServer#start):
partially revert r35315.

* test/webrick/test_server.rb (test_start_exception):
  received signal is delivered to the main thread, so it is needed to
  emulate it. patched by Eric Hodel. [ruby-core:44348] [Feature #6236]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14 02:30:43 +00:00
drbrain e95f7ea80d * variable.c (trace_ev): Removed "not reached" comment as this line is
reached.
* variable.c (rb_obj_remove_instance_variable):  Replaced "not reached"
  comment with the UNREACHABLE macro.
* variable.c (rb_mod_const_missing):  ditto.
* variable.c (rb_mod_remove_cvar):  ditto.
* enum.c (first_i):  ditto.
* string.c (rb_str_aref):  ditto.
* string.c (str_byte_aref):  ditto.
* string.c (rb_to_id):  ditto.
* io.c (rb_io_fmode_modestr):  ditto.
* io.c (rb_io_oflags_modestr):  ditto.
* pack.c (num2i32):  ditto.
* vm_eval.c (rb_method_missing):  ditto.
* vm_eval.c (rb_f_throw):  ditto.
* dir.c (dir_read):  ditto.
* win32/win32.c (child_result):  ditto.
* struct.c (rb_struct_getmember):  ditto.
* struct.c (rb_struct_set):  ditto.
* struct.c (rb_struct_aref_id):  ditto.
* eval.c (rb_f_raise):  ditto.
* process.c (rb_f_exit_bang):  ditto.
* process.c (rb_f_exit):  ditto.
* process.c (rb_f_abort):  ditto.
* ext/-test-/iter/break.c (iter_break_value):  ditto.
* ext/pty/pty.c (pty_check):  ditto.
* ext/openssl/ossl_pkey.c (ossl_pkey_new):  ditto.
* ext/readline/readline.c (rb_remove_history):  ditto.
* ext/stringio/stringio.c (strio_unimpl):  ditto.
* numeric.c (num_sadded):  ditto.
* numeric.c (num_init_copy):  ditto.
* numeric.c (rb_num2ll):  ditto.
* numeric.c (rb_num2ull):  ditto.
* vm_insnhelper.c (call_cfunc):  ditto.
* ruby.c (opt_W_getter):  ditto.
* bignum.c (rb_big_coerce):  ditto.
* file.c (rb_f_test):  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14 00:36:26 +00:00
drbrain da39d32f60 * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control
reaches end of non-void function" warnings.  [ruby-trunk - Bug #6066]
* re.c (name_to_backref_number):  ditto.
* object.c (rb_Float):  ditto.
* io.c (io_readpartial):  ditto.
* io.c (io_read_nonblock):  ditto.
* pack.c (rb_uv_to_utf8):  ditto.
* proc.c (rb_method_entry_arity):  ditto.
* vm_method.c (rb_f_notimplement):  ditto.
* struct.c (rb_struct_aset_id):  ditto.
* class.c (rb_scan_args):  ditto.
* process.c (rlimit_resource_type):  ditto.
* process.c (rlimit_resource_value):  ditto.
* process.c (p_uid_switch):  ditto.
* process.c (p_gid_switch):  ditto.
* ext/digest/digest.c (rb_digest_instance_update):  ditto.
* ext/digest/digest.c (rb_digest_instance_finish):  ditto.
* ext/digest/digest.c (rb_digest_instance_reset):  ditto.
* ext/digest/digest.c (rb_digest_instance_block_length):  ditto.
* ext/bigdecimal/bigdecimal.c (BigDecimalCmp):  ditto.
* ext/dl/handle.c (rb_dlhandle_close):  ditto.
* ext/tk/tcltklib.c (pending_exception_check0):  ditto.
* ext/tk/tcltklib.c (pending_exception_check1):  ditto.
* ext/tk/tcltklib.c (ip_cancel_eval_core):  ditto.
* ext/tk/tcltklib.c (lib_get_reltype_name):  ditto.
* ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core):  ditto.
* ext/tk/tkutil/tkutil.c (tk_hash_kv):  ditto.
* ext/openssl/ossl_ssl.c (ossl_ssl_session_reused):  ditto.
* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1):  ditto.
* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit):  ditto.
* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve):  ditto.
* ext/fiddle/conversions.c (generic_to_value):  ditto.
* ext/socket/raddrinfo.c (rsock_io_socket_addrinfo):  ditto.
* ext/socket/socket.c (sock_s_getnameinfo):  ditto.
* ext/ripper/eventids2.c (ripper_token2eventid):  ditto.
* cont.c (return_fiber):  ditto.
* dmydln.c (dln_load):  ditto.
* vm_insnhelper.c (vm_search_normal_superclass):  ditto.
* bignum.c (big_fdiv):  ditto.
* marshal.c (r_symlink):  ditto.
* marshal.c (r_symbol):  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 23:45:37 +00:00
svn d377a6fffe * 2012-04-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 15:34:39 +00:00
nobu 24476c0c0b * eval_error.c (error_print): use RB_TYPE_P instead of TYPE.
* error.c (rb_check_backtrace): ditto.
* error.c (name_err_mesg_to_str): compare immediate values
  directly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 15:34:34 +00:00
nobu 723bfaba59 * hash.c (no_new_key): moved test to raise outside.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 11:30:39 +00:00
naruse 99d38f82e0 * hash.c (inspect_i): keep string's coderange.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 08:39:13 +00:00
nobu 2d74f3e682 * hash.c (rb_hash_aset, rb_hash_update, rb_hash_update_by): use
st_update() to reduce evaluation of hash values.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 06:26:53 +00:00
naruse deb0519aec * lib/webrick/server.rb (WEBrick::GenericServer#stop): fix r35303;
this method is to deny new connections, not shutdown yet.

* lib/webrick/server.rb (WEBrick::GenericServer#start):
  re-raise exception only when the exception is Interrupt (^C).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 06:21:50 +00:00
svn d2e69f8584 * 2012-04-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 02:51:45 +00:00
nobu bb8446205f * gc.c (obj_free): show entire flags too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 02:51:40 +00:00
tadf 3a71da5830 * ext/date/date_core.c: added some notes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-12 10:52:58 +00:00
nobu 2417bd10d2 * test/ruby/test_autoload.rb: clear autoloaded paths.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-12 07:16:14 +00:00
nobu 871cd27c8d * gc.c (GET_HEAP_HEADER, NUM_IN_SLOT): parenthesise macro parameters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-12 06:10:33 +00:00
nobu e2aaf978b5 * hash.c: use RHASH_ITER_LEV(), not iter_leve directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-12 06:10:31 +00:00
naruse 1d6d4d2461 r35304 changes the exception.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-12 02:51:02 +00:00
ko1 45b3509ce1 Add a ticket number for last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-12 01:47:31 +00:00
ko1 ee7f8d4805 * compile.c (compile_array, compile_array_):
Divide big array (or hash) literals into several blocks and
  concatetene them.  There was a problem that a big array (hash)
  literal causes SystemStackError exception (stack overflow)
  because VM push all contents of the literal onto VM stack to
  make an array (or hash).  To solve this issue, we make several
  arrays (hashes) and concatenate them to make a big array (hash)
  object.
  ??
* compile.c (iseq_compile_each, setup_args): use modified
  compile_array.
* vm.c (m_core_hash_from_ary, m_core_hash_merge_ary,
  m_core_hash_merge_ptr): added for above change.
* id.c (Init_id), parse.y: add core method ids.
* bootstraptest/test_literal.rb: add simple tests.
* bootstraptest/test_eval.rb: remove rescue clause to catch
  SystemStackError exception.
* test/ruby/test_literal.rb: add tests to check no stack overflow.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-12 01:33:34 +00:00
drbrain 655738577f * lib/uri/generic.rb (module URI): URI now downcases the scheme to
follow RFC 2396 section 3.1.  [ruby-trunk - Feature #4551]
* test/uri/test_generic.rb (class URI):  Test for above


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 22:11:07 +00:00
drbrain ea9b6997cc * lib/net/protocol.rb (module Net): Added ReadTimeout to match
OpenTimeout.  ReadTimeout is now raised by rbuf_fill instead of
  Timeout::Error to help users distinguish what type of timeout
  occurred.  [ruby-trunk - Feature #6088]
* lib/net/pop.rb (module Net):  Updated documentation for ReadTimeout
  and OpenTimeout.
* lib/net/http.rb (module Net):  ditto
* lib/net/smtp.rb (module Net):  ditto
* lib/net/telnet.rb (module Net):  Net::ReadTimeout is now raised in
  waitfor to match Net::Protocol.
* test/net/http/test_http.rb:  Updated Timeout::Error expectation to
  Net::ReadTimeout.
* test/net/ftp/test_ftp.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 21:20:51 +00:00
drbrain 8c5c5a221f * lib/webrick/server.rb (module WEBrick::GenericServer): A server
will now continue only when a StandardError subclass is raised.  For
  other exception types the error will be logged at the fatal level and
  the server will safely stop.  Based on a patch by Alex Young.
  [ruby-trunk - Feature #6236]
* test/webrick/test_server.rb:  Test for new exception handling
  behavior.  Join the server thread instead of busy-waiting for it to
  shut down to remove race conditions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 20:28:11 +00:00
svn 2fe9d4642e * 2012-04-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 18:55:36 +00:00
naruse ce0223b15b * lib/test/unit.rb (Test::Unit:Runner::Worker#_run_suites):
call GC.start before running the test suites.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 18:55:32 +00:00
nobu db5265a82c * parse.y (rb_check_id_cstr): new function to check if ID is
registered with NUL-terminated C string.
* sprintf.c (rb_str_format): avoid inadvertent symbol creation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 13:31:23 +00:00
nobu a5d1da5d74 * sprintf.c (rb_str_format): fix exception message encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 13:01:16 +00:00
nobu 51f2207fc9 * test/ruby/test_sprintf.rb (test_named_untyped, test_named_typed):
split and add assertions for exception when named parameter after
  unnumbered.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 13:01:14 +00:00
nobu 23ba7541e5 * sprintf.c (rb_str_format): fix error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 12:43:56 +00:00
shirosaki 2f7290d4b3 * io.c (rb_io_eof): use eof() instead of io_fillbuf(). It's because
io_unread() doesn't work properly when reading CRLF with read(length)
  and mode 'r'.
  [ruby-core:44189][Bug #6271]

* test/ruby/test_io_m17n.rb (TestIO_M17N#test_read_crlf_and_eof):
  test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 12:05:19 +00:00