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

32681 Коммитов

Автор SHA1 Сообщение Дата
tenderlove 988ca60565 * io.c (io_read_nonblock): support non-blocking reads without raising
exceptions. As in: `io.read_nonblock(size, exception: false)`
  [ruby-core:38666] [Feature #5138]
* ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): ditto
* ext/stringio/stringio.c (strio_sysread): ditto
* io.c (rb_io_write_nonblock): support non-blocking writes without
  raising an exception.
* ext/openssl/ossl_ssl.c (ossl_ssl_write_internal): ditto
* test/openssl/test_pair.rb (class OpenSSL): tests
* test/ruby/test_io.rb (class TestIO): ditto
* test/socket/test_nonblock.rb (class TestSocketNonblock): ditto
* test/stringio/test_stringio.rb (class TestStringIO): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 22:41:44 +00:00
svn eadad2c900 * 2013-08-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 20:24:59 +00:00
drbrain e487a7f53c * lib/rubygems: Import RubyGems 2.1.0 Release Candidate
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 20:24:51 +00:00
eregon cddd93a575 fix typo of r42691
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 08:59:55 +00:00
nobu a6a85a0cb7 parse.y: warn CR
* parse.y (parser_nextc): warn carriage return in middle of line.
  [ruby-core:56240] [Feature #8699]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 07:25:08 +00:00
nobu 1a3bcf103c timeout.rb: skip rescue
* lib/timeout.rb (Timeout#timeout): should not be caught by rescue
  clause.  [Bug #8730]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 06:27:48 +00:00
nobu c075b153e8 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 06:02:47 +00:00
ko1 ad0ef29da7 * array.c (rb_ary_splice): use RARRAY_PTR_USE() without WB because
there are not new relations.
* enum.c (enum_sort_by): ditto.
* struct.c (setup_struct): use RARRAY_RAWPTR().
* vm_eval.c (yield_under): ditto.
* ext/pathname/pathname.c (path_entries): use RARRAY_AREF().
* ext/pathname/pathname.c (path_s_glob): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 05:47:27 +00:00
nobu bf2a494ebc ChangeLog: convert with `iconv -t us-ascii//translit'. [Bug #8819]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 04:27:35 +00:00
kazu e86d9fe858 * array.c (ary_ensure_room_for_push): fix typo in r42658.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 04:13:46 +00:00
nobu 21d7cd3988 sizes.c.tmpl: autogenerate
* template/sizes.c.tmpl: generate automatically by extracting
  RUBY_CHECK_SIZEOF from configure.in.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 03:37:15 +00:00
svn c3ab2dc6ae * 2013-08-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 01:39:24 +00:00
kazu ae5ac37f2d fix typo
* process.c (gcd_timetick_int): Renamed from gcd_timtick_int.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 01:39:19 +00:00
akr dac8c1e564 * sizes.c (Init_sizes): Define the size of clock_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-25 12:07:09 +00:00
ktsj 36c4a3015f * object.c: [DOC] remove comment about trust/untrust.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-25 11:48:24 +00:00
svn 92749430a6 * 2013-08-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-24 16:51:29 +00:00
akr 5a0e4a5871 * bignum.c (BARY_SHORT_MUL): Renamed from BARY_MUL1.
(bary_short_mul): Renamed from bary_mul1.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-24 16:51:23 +00:00
akr cd9f60dfa5 [DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-24 02:19:41 +00:00
akr 8eb27cb16f [DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-24 02:01:07 +00:00
svn 46dbe3f3b7 * 2013-08-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-24 01:38:39 +00:00
akr 811eaddf4c * process.c (rb_clock_gettime): The emulated clock names changed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-24 01:38:34 +00:00
nobu fb9b9b1862 win32ole.c: ID overflow
* ext/win32ole/win32ole.c (GetIDsOfNames): check ID overflow against
  DISPID, aka LONG, which is always 4 bytes.

* ext/win32ole/win32ole.c (Invoke): use ID for method name to get rid
  of losing upper bits.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 14:09:49 +00:00
akr 282bbea0d9 add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 13:46:25 +00:00
akr a0cac92b34 * process.c (rb_clock_gettime): Add a cast to fix compile error by
-Werror,-Wshorten-64-to-32.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 13:25:12 +00:00
nobu 703bd17594 process.c: no symbol cache
* process.c (rb_intern): no symbol cache while initialization.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 13:12:46 +00:00
nobu 5784aaf15d configure.in: clock_t
* configure.in (clock_t): needs time.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 13:07:59 +00:00
akr ca0b5118a5 * process.c (reduce_factors): New function.
(timetick2dblnum): Use reduce_factors.
  (timetick2integer): Ditto.
  (make_clock_result): Follow the above change.
  (rb_clock_gettime): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 12:46:06 +00:00
akr f0bf7f7518 * process.c (timetick_int_t): Renamed from timetick_giga_count_t.
(gcd_timtick_int): Renamed from gcd_ul and make the arguments
  timetick_giga_count_t.
  (reduce_fraction): Make the arguments timetick_int_t.
  (timetick2integer): Ditto.
  (make_clock_result): Ditto.
  (timetick2dblnum): Fix the return type.
  (rb_clock_gettime): Use timetick_int_t.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 12:06:02 +00:00
akr bf9ce0429f Fix the previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 11:53:12 +00:00
akr 49b9f61fdb * process.c (gcd_ul): New function.
(reduce_fraction): Ditto.
  (reduce_fraction): Ditto.
  (timetick2dblnum): Ditto.
  (timetick2integer): Ditto.
  (make_clock_result): Use timetick2dblnum and timetick2integer.
  (rb_clock_gettime): Follow the make_clock_result change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 10:44:33 +00:00
ko1 5bcdc68c6e * array.c (ary_make_shared): shared ary as shady. Need more effort to
make it normal object.
* array.c (rb_ary_modify): use RARRAY_PTR_USE() without WB because
  there are not new relations.
* array.c (ary_ensure_room_for_unshift): use RARRAY_RAWPTR() because
  there are not new relations.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 09:42:18 +00:00
nobu f539e9cbf3 win32ole.c: store directly
* ext/win32ole/win32ole.c (ole_wc2vstr): store converted multibyte
  string to string value directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 08:17:59 +00:00
nobu dcdde335a6 win32ole.c: suppress a warning
* ext/win32ole/win32ole.c (ole_vstr2wc): downcast to suppress a
  warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 08:17:56 +00:00
nobu df3c472ac3 win32ole.c: check method name length
* ext/win32ole/win32ole.c (fole_missing): reject too long method name,
  as Ruby string length is limited to long.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 08:17:53 +00:00
nobu 91218a0e9f win32ole.c: suppress warnings
* ext/win32ole/win32ole.c (ole_excepinfo2msg, ole_wc2vstr): get rid of
  size_t with rb_enc_str_new() to suppress warnings on x64-mswin32.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 08:17:50 +00:00
nobu 3134c5eb62 win32ole.c: no copy string
* ext/win32ole/win32ole.c (foletypelib_name, foletypelib_path):
  WC2VSTR() returns a string in cWIN32OLE_enc, no need to copy another
  string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 08:17:47 +00:00
nobu e2b08f40b3 win32ole.c: fix type
* ext/win32ole/win32ole.c (ole_method_docinfo_from_type): fix return type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 08:17:43 +00:00
ko1 c50d45fc96 * array.c: introduce ARY_SHARED_OCCUPIED(shared).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 02:27:32 +00:00
nobu fb8b2689db process.c: suppress warnings
* process.c (rb_clock_gettime): cast for tv_nsec explicitly to
  suppress warnings by VC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 02:17:25 +00:00
svn d12cf192de * 2013-08-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 02:07:25 +00:00
nobu ec02633065 Makefile.sub: SIZEOF_CLOCK_T
* win32/Makefile.sub (config.h): now SIZEOF_CLOCK_T is needed for
  unsigned_clock_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 02:07:20 +00:00
akr a641003f66 * process.c (rb_clock_gettime): Strip "s" from unit names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-22 13:04:06 +00:00
akr 3873e09cad * process.c (unsigned_clock_t): Defined.
(rb_clock_gettime): Consider clock_t overflow for
  ISO_C_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID.

* configure.in: Check the size of clock_t.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-22 11:19:49 +00:00
ko1 5a87332ef9 * compile.c (build_postexe_iseq): fix to setup the local table.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-22 07:23:44 +00:00
ko1 7e5d63f483 * compile.c (rb_iseq_compile_node): accept NODE_IFUNC to support
custom compilation.
* compile.c (NODE_POSTEXE): compile to
  "ONCE{ VMFrozenCore::core#set_postexe{...} }" with a new custom
  compiler `build_postexe_iseq()'.
* vm.c (m_core_set_postexe): remove parameters (passed by a block).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-22 06:50:42 +00:00
akr 9438bc0c86 Exchange order of ISO_C_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID and
POSIX_TIMES_BASED_CLOCK_PROCESS_CPUTIME_ID.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-21 22:17:55 +00:00
akr cda87d9e00 * process.c (rb_clock_gettime): Change emulation symbols for
Process.clock_gettime.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-21 21:57:25 +00:00
svn aad08a091b * 2013-08-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-21 21:27:58 +00:00
akr 47ae41ce34 * process.c (make_clock_result): Extracted from rb_clock_gettime.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-21 21:27:44 +00:00
akr 4c661094c9 * process.c (rb_clock_gettime): clock() based CLOCK_PROCESS_CPUTIME_ID
emulation implemented.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-21 13:33:59 +00:00