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

31254 Коммитов

Автор SHA1 Сообщение Дата
zzak 51c43dba6a * ext/bigdecimal/*: improve documentation, nodoc samples with @mrkn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 14:44:25 +00:00
kou 2b83a57fcb * lib/xmlrpc/client.rb (XMLRPC::Client#http): Add reader for raw
Net::HTTP. [ruby-core:55197] [Feature #8461]
  Reported by Herwin Weststrate. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 14:07:28 +00:00
kou 16d5c80678 * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Support
multiple names in a response. [ruby-core:41711] [Bug #5774]
  Reported by Roman Riha. Thanks!!!
* test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_override):
  Add a test of the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 13:46:54 +00:00
kou 102e2cd563 * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Use
guard style.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 13:36:52 +00:00
nobu 4b5267018a fileutils.rb: fix traversal loop
* lib/fileutils.rb (FileUtils#rmdir): fix traversal loop, not trying
  remove same directory only.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 13:12:35 +00:00
nobu d479419ad3 test_fileutils.rb: parents option
* test/fileutils/test_fileutils.rb (TestFileUtils#test_rmdir): add
  assertions for parents option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 13:03:30 +00:00
akr b4bafcb416 Use ny instead of RBIGNUM_LEN(y).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 13:02:34 +00:00
nobu f28ec8da8c no alternate value expansion
* configure.in (opt-dir), tool/ifchange: get rid of "alternate value"
  expansion for legacy sh.  [ruby-dev:47420] [Bug #8524]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 12:30:24 +00:00
nobu e6226e2c9d * ChangeLog: fix typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 12:30:19 +00:00
akr 63dd3e7ef9 * bignum.c (bigdivrem): Refactored to use ALLOCV_N for temporally
buffers.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 12:26:33 +00:00
usa 138bc4c0c4 * bignum.c (integer_unpack_num_bdigits_generic): reorder terms (but not
changed the intention of the expression) because VC++ reports a
  warning for it.  reported by ko1 via IRC.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 09:56:52 +00:00
akr 3e3080ef58 * test/ruby/test_thread.rb (test_thread_local_security): Don't create
an unused thread.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 09:54:02 +00:00
akr db3b317ca7 * bignum.c (bigdivrem): Use nlz.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 09:35:05 +00:00
nobu 392d7a797a bignum.c: suppress warnings
* bignum.c (integer_unpack_num_bdigits_generic): suppress "implicit
  conversion shortens 64-bit value into a 32-bit value" warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 07:33:12 +00:00
nobu 3dbf227ed0 ruby.h: safe_level check
* include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): check constant safe
  level at compile time.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 05:51:14 +00:00
nobu 0e76c14085 eval.c: use local variable
* eval.c (make_exception): use local variable for argv[0].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 05:44:31 +00:00
shugo 1474dd064b * test/-ext-/test_printf.rb, test/rss/test_parser.rb,
test/ruby/test_array.rb, test/ruby/test_hash.rb,
  test/ruby/test_m17n.rb, test/ruby/test_marshal.rb,
  test/ruby/test_object.rb, test/ruby/test_string.rb: don't use
  untrusted?, untrust, and trust to avoid warnings in case $VERBOSE is
  true.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 05:41:44 +00:00
akr 90026ab53f Refine debug code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 03:20:28 +00:00
shugo c8151d1235 * bootstraptest/test_autoload.rb, bootstraptest/test_method.rb:
remove tests for $SAFE=4.

* lib/pp.rb: use taint instead of untrust to avoid warnings when
  $VERBOSE is set to true.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 02:01:42 +00:00
kazu 23ab11f14a fix a typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 00:30:00 +00:00
akr 2b1c2b7223 * bignum.c (integer_unpack_num_bdigits_small): Fix a comple error on
clang -Werror,-Wshorten-64-to-32
  Reported by Eric Hodel.  [ruby-core:55467] [Bug #8522]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 21:13:56 +00:00
drbrain d341276561 * ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X
10.7+.  [ruby-trunk - Bug #8517]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 20:32:42 +00:00
svn 80a474a1e5 * 2013-06-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 15:18:05 +00:00
akr aaa1461d7b * bignum.c (rb_integer_unpack_2comp): New function.
(rb_integer_unpack_internal): Extracted from rb_integer_unpack and
  nlp_bits_ret argument added.
  (integer_unpack_num_bdigits_small): nlp_bits_ret argument added to
  return number of leading padding bits.
  (integer_unpack_num_bdigits_generic): Ditto.

* internal.h (rb_integer_unpack_2comp): Declared.

* pack.c (pack_unpack): Use rb_integer_unpack_2comp and
  rb_integer_unpack.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 15:18:00 +00:00
shugo 17f1cdaa00 * eval.c (mod_using): new method Module#using, which activates
refinements of the specified module only in the current class or
  module definition.  [ruby-core:55273] [Feature #8481]

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 14:33:59 +00:00
shugo 1f828497d1 * safe.c (rb_set_safe_level, safe_setter): raise an ArgumentError
when $SAFE is set to 4.  $SAFE=4 is now obsolete.
  [ruby-core:55222] [Feature #8468]

* object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust):
  Kernel#untrusted?, untrust, and trust are now deprecated.
  Their behavior is same as tainted?, taint, and untaint,
  respectively.

* include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED()
  and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(),
  respectively.

* array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c,
  ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c,
  ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c,
  ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c,
  ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c,
  ext/socket/socket.c, ext/socket/udpsocket.c,
  ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c,
  ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c,
  load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c,
  safe.c, string.c, thread.c, transcode.c, variable.c,
  vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for
  $SAFE=4.

* test/dl/test_dl2.rb, test/erb/test_erb.rb,
  test/readline/test_readline.rb,
  test/readline/test_readline_history.rb, test/ruby/test_alias.rb,
  test/ruby/test_array.rb, test/ruby/test_dir.rb,
  test/ruby/test_encoding.rb, test/ruby/test_env.rb,
  test/ruby/test_eval.rb, test/ruby/test_exception.rb,
  test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb,
  test/ruby/test_io.rb, test/ruby/test_method.rb,
  test/ruby/test_module.rb, test/ruby/test_object.rb,
  test/ruby/test_pack.rb, test/ruby/test_rand.rb,
  test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb,
  test/ruby/test_struct.rb, test/ruby/test_thread.rb,
  test/ruby/test_time.rb: remove tests for $SAFE=4.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 14:20:51 +00:00
akr b53a183c00 * bignum.c (integer_unpack_num_bdigits_generic): Rewritten without
rb_funcall.
  (integer_unpack_num_bdigits_bytes): Removed.
  (rb_integer_unpack): integer_unpack_num_bdigits_bytes invocation
  removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 13:25:00 +00:00
kou 007fb3b160 * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.
Sorry for forgetting it in r41236.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 11:19:18 +00:00
akr 4e0685faea * bignum.c (validate_integer_pack_format): supported_flags argument
added and validate given flags.
  (rb_integer_pack_internal): Specify supported_flags.
  (rb_integer_unpack): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 09:21:11 +00:00
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