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

12200 Коммитов

Автор SHA1 Сообщение Дата
nobu 6a7afe4247 * vm_evalbody.c (DECL_SC_REG): typo fixed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 07:18:32 +00:00
shyouhei 322d8dfb0e * string.c (rb_enc_cr_str_buf_cat): do not use C++ comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 07:08:41 +00:00
shyouhei 31049a6fd6 * configure.in: use AC_USE_SYSTEM_EXTENSIONS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 07:03:32 +00:00
nobu df5b0f317b * configure.in (struct timespec): needs time.h according to POSIX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 06:25:05 +00:00
matz 707c50d341 * thread.c (rb_thread_stop_timer_thread): should clear
timer_thread_id after stopping it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 04:26:44 +00:00
nobu 9c77076296 * thread.c (thread_join): remove the current thread from the join list
of the target thread.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 04:13:01 +00:00
akr 62aa7aae51 exec "/" causes SEGV.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 04:11:13 +00:00
nobu a0f487921e * vm_insnhelper.c (vm_get_ev_const): search from the base klass if it
is given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 03:03:51 +00:00
usa 11fbd724cc * ext/win32ole/win32ole.c: avoid warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 00:58:51 +00:00
usa 915b5c5508 * file.c (eaccess): workaround for recent msvcrt's behavior.
[ruby-core:16460]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 00:58:04 +00:00
akr b1166a0469 * io.c (copy_stream_body): call rb_io_check_readable and
rb_io_check_writable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21 10:09:33 +00:00
knu ffc456d0ed * ext/dbm/dbm.c (fdbm_each_value, fdbm_each_key, fdbm_each_pair):
GDBM#{each,each_pair,each_key,each_value}: Return an enumerator
	  if no block is given.

	* ext/gdbm/gdbm.c (fgdbm_each_value, fgdbm_each_key,
	  fgdbm_each_pair): GDBM#{each,each_pair,each_key,each_value}:
	  Return an enumerator if no block is given.

	* ext/openssl/ossl_config.c (ossl_config_each):
	  OpenSSL::Config#each: Return an enumerator if no block is given.

	* ext/readline/readline.c (hist_each): Readline::HISTORY#each:
	  Return an enumerator if no block is given.

	* ext/sdbm/init.c (fsdbm_each_value, fsdbm_each_key,
	  fsdbm_each_pair): SDBM#{each,each_pair,each_key,each_value}:
	  Return an enumerator if no block is given.

* ext/stringio/stringio.c (strio_each_byte, strio_each):
  StringIO#{each,each_line,each_byte}: Return an enumerator if no
  block is given.

* ext/stringio/stringio.c (Init_stringio): Add #lines and #bytes,
  which are aliases to #each_line and #each_byte, respectively.

* ext/win32ole/win32ole.c (fole_each): WIN32OLE#each: Return an
  enumerator if no block is given.

* ext/zlib/zlib.c (rb_gzreader_each_byte, rb_gzreader_each):
  Zlib::GzipReader#{each,each_line,each_byte}: Return an
  enumerator if no block is given.

* ext/zlib/zlib.c (Init_zlib): Add Zlib::GzipReader#lines and
  #bytes, which are aliases to #each_line and #each_byte,
  respectively.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21 08:48:33 +00:00
nobu eeceb720a9 * ChangeLog: typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21 08:19:19 +00:00
nobu 11f2fa4ade * iseq.c (rb_iseq_compile_with_option): check if src is a strring.
[ruby-core:16453]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21 08:01:46 +00:00
matz 59b08c22b5 * enumerator.c (enumerator_init): preserve the method name in ID.
* enumerator.c (enumerator_each): need not to call rb_to_id().

* enumerator.c (enumerator_with_index): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21 07:07:39 +00:00
matz 7243069d29 * compile.c (defined_expr): capture exception during defined?
evaluation.  a patch from wanabe <s.wanabe at gmail.com> in
  [ruby-dev:34461].  [ruby-core:16010]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21 02:02:26 +00:00
matz 6a45f0a50e * time.c: should include <errno.h> to refer errno.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21 01:07:00 +00:00
usa 7dd42a48e1 * time.c (rb_strftime): check errno to detect strftime(3)'s error.
this is workaround for recent version of MSVCRT.
	  [ruby-dev:34456]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21 00:59:43 +00:00
usa fd8734a64d * gc.c (ruby_xmalloc): use size_t for malloc argument instead of long.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 23:55:09 +00:00
technorama 45acd59d2d * ext/openssl/ossl_ssl.c: Switch stats hash key from string to symbol.
New method SSLContext#setup to aid C extension writers.
* test/openssl/test_ssl.rb: Add tests for new method and sessions.
  Use threads for ssl server instead of forking.
* ext/openssl/ossl_version.h: Bump version.
* ext/openssl/ossl_x509ext.c: Fix warnings.
* test/openssl/utils.rb: Fix warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 22:32:06 +00:00
knu d657d4feb3 * enumerator.c, include/ruby/ruby.h: Export rb_cEnumerator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 12:01:27 +00:00
knu 3537b97bc1 * enumerator.c: Resolve the method every time an enumeration
method is run, not once when the enumerator is initialized as it
  was before, so that method_missing() and method (re)definition
  afterwards are both in effect; pointed out in: [ruby-core:16441]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 11:58:44 +00:00
akr 935933d0d3 fix deadlock.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 11:30:43 +00:00
akr 6aee0a5bca update sprintf rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 06:44:41 +00:00
nobu 5e433ffc6c * file.c (file_expand_path): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 06:19:28 +00:00
nobu d92efa3c0b * io.c (copy_stream_func): suppress warnings.
* thread_pthread.c (add_signal_thread_list): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 06:14:49 +00:00
akr ae2921ae67 * io.c (copy_stream_rbuf_to_dst): removed.
(copy_stream_fallback_body): don't bypass write method.
  (copy_stream_body): simplified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 06:13:17 +00:00
nobu 64a16b9ede * vm_core.h (struct iseq_compile_data): moved label_no from
new_label_body().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 06:01:28 +00:00
nobu 36f984b65e * compile.c (iseq_set_exception_table): allocates catch_table only
when entries exist.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 06:00:51 +00:00
nobu 9ddb37f071 * compile.c (struct iseq_link_element, struct iseq_insn_data): made
enum for debuggers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 05:58:59 +00:00
nobu f4f95b98d4 * compile.c (iseq_compile_each): fix for splat in when and rescue.
a patch from wanabe <s.wanabe AT gmail.com> in [ruby-dev:34429].
  [ruby-core:14537]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 05:44:47 +00:00
akr 01c433b58c * io.c (copy_stream_fallback): write directly (bypassing write method)
if possible.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 04:59:04 +00:00
akr f0fbfeda51 avoid warnings in copy_stream_body.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 04:12:32 +00:00
akr a16e0c29db * io.c (copy_stream_fallback): read directly (bypassing readpartial)
if possible.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 03:51:57 +00:00
akr 9579647fe1 * io.c (copy_stream_body): use readpartial and write method for
non-IOs such as StringIO and ARGF.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-19 19:47:16 +00:00
akr 24197c48d2 fix setup method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-19 19:09:22 +00:00
mame 3e9af6da10 * test/ruby/test_array.rb: add tests to achieve over 95% test coverage
of array.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-18 11:58:30 +00:00
nobu 6b5e24a61a * gc.c (rb_gc_mark_locations): get rid of underflow.
* gc.c (mark_current_machine_context): check if the main thread stack
  position may shink under the intialized position.  [ruby-core:16436]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-18 08:37:50 +00:00
usa 38af102ccc * 2008-04-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-17 15:22:18 +00:00
yugui 73713cc1f0 * ruby.1: fixed typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-17 15:09:06 +00:00
yugui 30128a68c4 * ruby.1: added --{disable|enable}-{rubyopt|all}.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-17 14:52:14 +00:00
mame 0a2053713b * enc/trans/utf_16_32.c (fun_so_to_utf_16be, fun_so_to_utf_16le): add
parentheses to remove warnings of gcc.

* io.c (rb_io_getc): remove unused variables.

* compile.c (NODE_NEXT, NODE_REDO): remove unused labels.

* ext/nkf/nkf.c (rb_nkf_convert): remove unused variables.

* ext/syck/rubyext.c (syck_resolver_initialize,
  syck_resolver_detect_implicit, syck_emitter_emit): remove unused
  variables.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-17 13:22:40 +00:00
mame 6f4fb0981d * test/ruby/test_rubyoptions.rb (test_search): enable some assertions.
* test/ruby/test_rubyoptions.rb: flunk message in win32.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-17 11:13:34 +00:00
nobu f23828fa12 * test/ruby/test_rubyoptions.rb (ruby): run in C locale.
* test/ruby/test_rubyoptions.rb (test_encoding): --encoding does not
  affect source code.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-17 07:07:14 +00:00
mame 4133458dee * test/ruby/test_process.rb (test_rlimit_nofile): reset RLIMIT_NOFILE
before exit (for gcov).
* test/ruby/test_rubyoptions.rb: new tests for option of ruby
  interpreter, to achieve over 95% test coverage of ruby.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-16 15:48:54 +00:00
nobu 6cdd421a9b * ruby.c (process_options): preludes and parser need to run in safe
level 0.  [ruby-dev:34407]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 17:40:46 +00:00
nobu 73437c05f5 * ruby.c (process_options): dln_find_file returns the pointer to a
static buffer, so should copy it.  [ruby-dev:34409]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 17:26:29 +00:00
kou 2625e3425d * test/xmlrpc/test_cookie.rb: set svn:eol-style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 14:21:23 +00:00
kou 17ea268764 * lib/xmlrpc/client.rb: fix cookie handling. [ruby-dev:34403]
* test/xmlrpc/test_cookie.rb: add a test for the above fix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 14:10:18 +00:00
matz 5a4c8a1ad7 * io.c: #undef rb_argv moved before #define.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 10:21:01 +00:00