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

31225 Коммитов

Автор SHA1 Сообщение Дата
knu 2a23bd6202 Add Appendix C containing a pointer to mkmf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 08:48:01 +00:00
nobu 2eadce6743 test_io.rb: fix test error
* test/ruby/test_io.rb (TestIO#test_write_32bit_boundary): retry to
  remove the temporary file while EACCES occurs because of syncing in
  the system probably.  rescue ENOSPC from IO#tell.  [ruby-core:55457]
  [Bug #8519]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 08:05:56 +00:00
nobu 221496de7c array.c: fix false assertions
* array.c (rb_ary_sort_bang): remove duplicated assertions.
  ARY_HEAP_PTR() implies ary not to be embedded.  [ruby-dev:47419]
  [Bug #8518]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 07:41:40 +00:00
knu c3b8191019 Update rdoc for pkg_config() and move :stopdoc: below to enable it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 07:08:08 +00:00
knu bccf874ceb Elaborate on side-effects of mkmf functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 06:41:11 +00:00
nobu ab64f23771 io.c: fix 7bit coderange condition
* io.c (io_getc): fix 7bit coderange condition, check if ascii read
  data instead of read length. [ruby-core:55444] [Bug #8516]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 03:44:48 +00:00
akr ff6104ba62 * pack.c (pack_pack): Use rb_integer_pack_2comp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 03:35:54 +00:00
akr 174e3fb6e4 * sprintf.c (rb_str_format): Fix a dynamic format string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 03:09:28 +00:00
nobu 7fa5e608d3 array.c: freeze in callback
* array.c (rb_ary_uniq_bang): must not be modified once frozen even in
  a callback method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 03:04:11 +00:00
nobu da786437a7 array.c: freeze in callback
* array.c (rb_ary_sort_bang): must not be modified once frozen even in
  a callback method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 03:03:46 +00:00
nobu ff7bb4723b array.c: fix false assertion
* array.c (FL_SET_EMBED): shared object is frozen even when get
  unshared.
* array.c (rb_ary_modify): ARY_SET_CAPA needs unshared array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 03:00:24 +00:00
nobu 299d96cadd parse.y: non-shady ruby_debug_lines
* parse.y (parser_set_encode): get rid of making ruby_debug_lines
  non-shady.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 03:00:22 +00:00
nobu 6ff25d132d array.c: assertion
* array.c (ary_shrink_capa): additional assertion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 03:00:17 +00:00
kazu a5acd8c8d3 fix indent (use tab instead of spaces)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 03:00:00 +00:00
akr e39523b77b * random.c (rand_int): Use rb_big_uminus.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 22:33:01 +00:00
drbrain 28d975a633 * struct.c: Improve documentation: replace "instance variable" with
"member", recommend the use of a block to customize structs, note
  that member accessors are created, general cleanup.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 22:17:02 +00:00
akr 0c9a719d77 * internal.h (INTEGER_PACK_NEGATIVE): Defined.
(rb_integer_unpack): sign argument removed.

* bignum.c (rb_integer_unpack): sign argument removed.
  Non-negative integers generated by default.
  INTEGER_PACK_NEGATIVE flag is used to generate non-positive integers.

* pack.c (pack_unpack): Follow the above change.

* random.c (int_pair_to_real_inclusive): Ditto.
  (make_seed_value): Ditto.
  (mt_state): Ditto.
  (limited_big_rand): Ditto.

* marshal.c (r_object0): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 21:39:55 +00:00
akr a338c4ed5d Unused variable removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 16:37:37 +00:00
svn 72eed1fdbf * 2013-06-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 15:09:06 +00:00
kou 3acd222fa5 * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.
* test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_simple):
  Add a test for the extracted method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 15:08:59 +00:00
kou 83c02765e1 * test/xmlrpc/test_client.rb (XMLRPC::ClientTest::Fake::HTTP#started):
Add a missing empty line.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 14:57:05 +00:00
akr b23d9a8a63 * bignum.c (validate_integer_pack_format): Don't require a word order
flag if numwords is 1 or less.
  (absint_numwords_generic): Don't specify a word order for
  rb_integer_pack.

* hash.c (rb_hash): Ditto.

* time.c (v2w_bignum): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 14:40:16 +00:00
akr c4b12333f7 * bignum.c (validate_integer_pack_format): Refine error messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 14:02:46 +00:00
akr 06b1671107 * bignum.c (validate_integer_pack_format): numwords argument added.
Move a varidation from rb_integer_pack_internal and rb_integer_unpack.
  (rb_integer_pack_internal): Follow above change.
  (rb_integer_unpack): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 13:28:33 +00:00
akr 17a5321c40 rb_integer_pack tests refined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 13:15:56 +00:00
akr d5a3818f8e * bignum.c (rb_integer_pack_internal): Renamed from rb_integer_pack
and overflow_2comp argument added.
  (rb_integer_pack): Just call rb_integer_pack_internal.
  (rb_integer_pack_2comp): New function.

* internal.h (rb_integer_pack_2comp): Declared.

* sprintf.c (rb_str_format): Use rb_integer_pack and
  rb_integer_pack_2comp to format binary/octal/hexadecimal integers.
  (ruby_digitmap): Declared.
  (remove_sign_bits): Removed.
  (BITSPERDIG): Ditto.
  (EXTENDSIGN): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 12:06:40 +00:00
knu b7597efb48 Update documentation for pkg_config().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 08:25:40 +00:00
knu 832525515a Fix the mail address of Matz; ruby-lang.jp does not exist.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 08:01:38 +00:00
nobu c5c201f624 array.c: fix false assertion in ary_make_shared
* array.c (ary_shrink_capa): shrink the capacity so it fits just with
  the length.
* array.c (ary_make_shared): release never used elements from frozen
  array to be shared.  [ruby-dev:47416] [Bug #8510]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 07:15:24 +00:00
nobu 4cdd6f6ab8 * eval_error.c (error_print): reduce RARRAY_AREF().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 06:57:04 +00:00
zzak df4abd9b3b * doc/re.rdoc: Rename to doc/regexp.rdoc
* re.c: Update rdoc include for rename of file


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11 03:50:33 +00:00
tarui c0ce877365 * eval_error.c (error_print): keep that errat is non-shady object.
and guard errat from GC.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 22:14:27 +00:00
svn 33e6f434ed * 2013-06-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 20:06:58 +00:00
eregon 8c6674ef03 * ext/racc/cparse/cparse.c: use rb_ary_entry() and
rb_ary_subseq() instead of RARRAY_PTR.
  Based on a patch by Dirkjan Bussink. See Bug #8399.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 20:06:53 +00:00
kazu 0ab44dbc3c fix a typo
* array.c (rb_ary_new_from_values): fix a typo. pointed out by nagachika.
  http://d.hatena.ne.jp/nagachika/20130610/ruby_trunk_changes_41199_41220

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 14:54:21 +00:00
akr 46bb1a9f92 Update comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 13:51:20 +00:00
ktsj baabb76cd7 * test/ruby/test_beginendblock.rb (test_exitcode_in_at_exit): fix NameError.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 13:28:58 +00:00
akr 780ab06a0e Update a comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 13:10:11 +00:00
kou e214b1b6d3 * ext/socket/raddrinfo.c (nogvl_getaddrinfo): Fix indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 12:51:48 +00:00
kou f6921a3cd1 * ext/socket/raddrinfo.c (nogvl_getaddrinfo): Add missing return
value assignment.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 12:50:45 +00:00
naruse 52a802a428 * ext/socket/raddrinfo.c (nogvl_getaddrinfo): work around for Ubuntu
13.04's getaddrinfo issue with mdns4. [ruby-list:49420]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 11:59:36 +00:00
akr 6735633663 Update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 10:55:08 +00:00
akr 0e8caa7d0f * bignum.c (rb_integer_pack): Returns sign instead of words.
(absint_numwords_generic): Follow the above change.
  (big2str_base_powerof2): Follow the above change.

* internal.h: Ditto.

* hash.c (rb_hash): Ditto.

* pack.c (pack_pack): Ditto.

* random.c (int_pair_to_real_inclusive): Ditto.
  (rand_init): Ditto.
  (random_load): Ditto.
  (limited_big_rand): Ditto.

* time.c (v2w_bignum): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 10:37:39 +00:00
ko1 a8aaf13392 * gc.c (rgengc_remember): permit promoted object.
(rb_gc_writebarrier -> remember)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 08:21:08 +00:00
ko1 a03ac78b2c * gc.c (RVALUE_PROMOTE): fix parameter name (`x' to `obj')
and make it inline function (like RVALUE_PROMOTE).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 08:15:31 +00:00
kazu d917e65143 fix a typo of r41205
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 08:00:04 +00:00
kazu 1188d9291c add missing space
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 08:00:01 +00:00
ko1 f8ba9a1f60 * array.c (rb_ary_new_from_values): add assertion
(ary should be young object).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 07:23:36 +00:00
ko1 dd96561f76 * gc.c (wmap_mark): check allocation of `w->obj2wmap'.
(no-allocation `w->obj2wmap' will be NULL pointer reference)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 07:12:14 +00:00
nobu 09de2b0544 eval_error.c: use checking functions
* eval_error.c (error_print): use checking functions instead of
  catching exceptions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-10 06:36:02 +00:00