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

10829 Коммитов

Автор SHA1 Сообщение Дата
tadf d5d39dd3fe * rational.c (nurat_{to_s,inspect}): performance improvement.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 12:47:07 +00:00
tadf 2d3f41d19f * complex.c: inpsect should not depend on to_s.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 12:44:06 +00:00
akr 415e2cbd88 * lib/open3.rb (Open3.pipeline_start): new method.
(Open3.pipeline): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 10:07:13 +00:00
akr 3406ddcb33 * process.c (run_exec_dup2): !save is false if Qnil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 09:58:23 +00:00
usa 5d65e0982d * win32/win32.c (rb_w32_read, rb_w32_write, rb_w32_isatty): check
whether fd is valid.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 09:08:24 +00:00
nobu f6d18c3f2a * iseq.c (rb_iseq_parameters): proc arguments are always optional.
* proc.c (get_proc_iseq, rb_proc_parameters): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 04:05:48 +00:00
nobu ed19ff6bdb * compile.c (iseq_set_sequence): uses rb_compile_warning() for
warning at compilation time.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 03:38:50 +00:00
nobu 794eb7bc49 * compile.c (ruby_iseq_compile, ruby_iseq_translate_threaded_code),
(ruby_insns_name_array, ruby_iseq_build_from_ary): prefixed with
  ruby_.

* iseq.c (ruby_iseq_load, ruby_insn_make_insn_table): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 03:35:48 +00:00
nobu cc1401e504 * string.c (rb_str_cmp_m): fixed rdoc. pointed out by <Thomas
C. Mitchell AT gmail.com> at [ruby-talk:321967]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 01:01:53 +00:00
akr 4433defb46 * io.c (io_binwrite): arg.offset should be updated after retry.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 22:59:25 +00:00
nobu 8e864d1e86 * load.c (rb_get_load_path): returns the load path without
touching.

* load.c (rb_feature_provided): new function to return the loading
  path in addition to rb_provided().

* load.c (search_required): sets path if loading.

* variable.c (autoload_provided): load paths are expanded to check
  if loading.

* variable.c (autoload_node): keeps autoload mark while loading.
  [ruby-core:20235]

* variable.c (rb_const_get_0): loops while autoload mark is set.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 18:29:20 +00:00
usa a9a4435e12 * win32/win32.c (rb_w32_read): ERROR_BROKEN_PIPE is not a real error
at this point.

	* io.c (pipe_open): use rb_w32_spawn() instead of rb_w32_pipe_exec()
	  to use our own redirection scheme.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 16:39:03 +00:00
nobu c7bd98b7b8 * string.c (sym_to_proc): use hidden object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 16:35:10 +00:00
matz 408ca7cbb1 * pack.c (pack_pack): propagate taint status from format string to
result string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 16:20:02 +00:00
usa 80a3f22b77 * process.c (run_exec_dup2): need to sort by reverted order when
restoring fds.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 15:35:08 +00:00
nobu f149326740 * string.c (sym_to_proc): caches Symbol procs, based on a patch from
Shumpei Akai <admin AT flexfrank.net>.  [ruby-dev:37265]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 15:17:21 +00:00
usa 8068f49727 * win32/win32.c (waitpid): fix bug of checking child slot.
* win32/win32.c (FindChildSlotByHandle): new.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 14:31:37 +00:00
akr bca9bf7fef * lib/open3.rb (Open3.poutput3): new method.
(Open3.poutput2): ditto.
  (Open3.poutput2e): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 14:24:54 +00:00
yugui 644d1e7a47 * spec/default.mspec: follows changes in rubyspec project.
inherits configurations from ruby.1.9.mspec.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 14:06:24 +00:00
tadf a821725ab0 * test/ruby/test_complex.rb: added some tests.
* test/ruby/test_rational.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 13:14:25 +00:00
akr 87c7905bdc * lib/open3.rb (Open3.popen3): simplified.
(Open3.popen_run): extracted from Open3.popen3.
  (Open3.popen2): new method.
  (Open3.popen2e): new method.
  (Open3.pipeline_rw): new method.
  (Open3.pipeline_r): new method.
  (Open3.pipeline_w): new method.
  (Open3.pipeline_run): new private method.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 10:58:32 +00:00
akr a112ec787a * process.c (check_exec_fds): resolve cascaded child fd reference.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 10:17:34 +00:00
matz 2bb4ca64f9 * lib/rubygems/validator.rb (Gem#remove_leading_dot_dir): make
this method private.  a patch from okkez in [ruby-dev:37245]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 07:58:55 +00:00
matz 57f7d8c2cd * ext/openssl/ossl_ssl.c (ossl_ssl_read_nonblock):
OpenSSL::SSL::SSLSocket should implement read_nonblock.  a patch
  from Aaron Patterson in [ruby-core:20277].  fix: #814 [ruby-core:20241]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 07:21:10 +00:00
matz 8a8226fa3b * lib/gserver.rb: fixed type in sample code. a report from Oleg
Puchinin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 07:17:27 +00:00
matz c69b59c43f * lib/rubygems/local_remote_options.rb (Gem#add_update_sources_option):
little documentation fix.  a patch from okkez.  [ruby-dev:37271]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 05:55:36 +00:00
matz f5332d6b5e * ext/curses/curses.c (curses_getch): no ISPRINT(). [ruby-core:20294]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 05:52:30 +00:00
matz 782576a519 * ext/curses/curses.c (window_getch): avoid ISPRINT() macro which
has an issue with OpenSolaris.  [ruby-core:20189]

* signal.c (ruby_signal): EINVAL from sigaction(2) is not a bug.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 04:57:58 +00:00
knu ea465ecda7 * enumerator.c (inspect_enumerator): Implement #inspect.
[ruby-dev:37248]-[ruby-dev:37263]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 02:44:38 +00:00
knu f259918c81 * vm_method.c (rb_obj_respond_to): Remove a duplicated rdoc
comment and fix a markup error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 02:39:55 +00:00
nagai c5d06834d2 * ChangeLog: add entry.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 21:09:31 +00:00
nagai 57746bb6fa * ext/tk/lib/tk.rb: bug fix. use ::RubyVM instead of ::VM [ruby-list:45676]
* ext/tk/tcltklib.c: update RELEASE_DATE


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 20:10:28 +00:00
tadf ef38a43c50 * complex.c (nurat_{to_s,inspect}): provides better representation
for in-finite imag part.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 16:43:01 +00:00
tadf 28c53aabca * complex.c (f_signbit): NaN may be signed value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 16:28:17 +00:00
akr 30b8f1ee2b * process.c (EXEC_OPTION_DUP2_CHILD): defined.
(check_exec_redirect_fd): check :in, :out and :err.
  (check_exec_redirect): check [:child, fd].
  (check_exec_fds): validate EXEC_OPTION_DUP2_CHILD array.
  (run_exec_dup2_child): new function.
  (rb_run_exec_options): call run_exec_dup2_child.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 15:02:10 +00:00
nobu 8c01ec883a * parse.y (expr): keyword_not can continue across newline.
[ruby-core:20252]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 13:54:42 +00:00
nobu 6e0f413f01 * iseq.c (simple_default_value): returns simplest assignment only.
[ruby-core:20237]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 13:41:01 +00:00
akr ca209c80e9 * process.c (check_exec_redirect): accept :in, :out, :err as redirect
target.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 12:33:37 +00:00
tadf e98e384be0 revert.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 12:19:05 +00:00
nobu 13424f32fe * ext/tk/tcltklib.c (ip_ruby_cmd, ip_invoke_with_position): must
not access internal union directly.  [ruby-list:45670]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 05:48:55 +00:00
nobu f71dcc1b54 * ChangeLog: fixed function name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 03:24:10 +00:00
nobu aa39c4491a * io.c (rb_io_getc, rb_io_readchar): documentation correction from
Emiel van de Laar.  [ruby-core:20212]

* ext/stringio/stringio.c (strio_ungetbyte): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 03:22:12 +00:00
matz 684f94c0ed * lib/rexml/xpath.rb (REXML::XPath.first): apply documentation
patch from Ken Bloom in [ruby-core:20213].

* lib/rexml/xpath.rb (REXML::XPath.each): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 00:31:58 +00:00
mame 7fd3ac4895 * test/ruby/test_rational.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 17:58:17 +00:00
mame 181ffea5e0 * test/ruby/test_range.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 17:53:48 +00:00
mame 0863013b96 * test/ruby/test_string.rb: add some tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 17:26:31 +00:00
mame 0646c1e0d6 * ext/pty/pty.c (Init_pty): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 17:05:46 +00:00
akr 852b4629c1 * lib/open3.rb (Open3.popen3): merge hash options if given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 10:23:48 +00:00
matz 348d715eaa * lib/net/protocol.rb (Net::BufferedIO#rbuf_fill): use
read_nonblock instead of sysread wrapped by timeout to boost
  performance.  a patch from Aaron Patterson in [ruby-core:20191].
  fix #806

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 06:34:19 +00:00
yugui 67b445f895 * set 1.9.1-p5000 into version number. [ruby-dev:36998]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-01 14:24:48 +00:00