Commit graph

15808 commits

Author SHA1 Message Date
svn
1306ae8a46 * 2011-08-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@33056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-24 21:27:18 +00:00
marcandre
baf7c85932 * NEWS: Integer#round was also updated (even though rdoc is unchanged)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@33055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-24 21:27:15 +00:00
marcandre
0dcfc8931f * NEWS: Actually, it's both Float#round and Numeric#round...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@33035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23 18:24:00 +00:00
marcandre
3385e6814e * NEWS: Correction; it's Float#round
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@33034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23 18:19:53 +00:00
svn
a32108b571 * 2011-08-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@33033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23 18:15:04 +00:00
marcandre
942facfaf2 * NEWS: Add Numeric#round to the list of modified methods
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@33032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23 18:15:00 +00:00
yugui
9f89da1847 merges r30896 from trunk into ruby_1_9_1.
--
* lib/fileutils.rb (FileUtils::remove_entry_secure): there is a
  race condition in the case where the given path is a directory,
  and some other user can move that directory, and create a
  symlink while this method is executing.
  Reported by: Nicholas Jefferson <nicholas at pythonic.com.au>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@30906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-18 11:59:29 +00:00
yugui
2e63271148 * lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#set_error):
Fix for possible cross-site scripting (CVE-2010-0541).
  Found by Apple, reported by Hideki Yamane.
  Patch by Hirokazu Nishio <nishio.hirokazu AT gmail.com>.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@28997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16 00:53:48 +00:00
svn
10bc4d23ce * 2010-07-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@28641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-14 10:07:28 +00:00
knu
1269a11da7 Merge r28639.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@28640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-14 10:07:27 +00:00
yugui
e3b9424dfa * io.c (argf_inplace_mode_set): prohibits an assignment
of a tainted value. Patch by unak.

* util.c, file.c: prevents a buffer over-run on windows.
Patch by unak.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@28522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-02 10:14:05 +00:00
svn
9450c64651 * 2010-07-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@28512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-01 07:59:05 +00:00
yugui
237fc68839 merges r26936 from trunk into ruby_1_9_1 and little refactoring.
--
* random.c (rb_reset_random_seed): set seed in this. [ruby-core:28655]
--
* random.c: refactoring.

* random.c (rand_srand): a new function that wraps
  rand_init and (re)initialization of the random seed as
  a VALUE.

* random.c (genrand_int32, genrand_real, rb_f_rand,
  rb_f_srand): using rand_srand.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@28511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-01 07:59:03 +00:00
yugui
58a4828163 merges r23892 from trunk into ruby_1_9_1.
--
	* rational.c (float_to_r): always returns rational.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@27982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-23 13:38:02 +00:00
yugui
ba595fe918 merges r24205 from trunk into ruby_1_9_1.
--
	* complex.c (make_patterns): do not use \d.

	* rational.c (make_patterns): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@27981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-23 13:37:59 +00:00
svn
3ae8d8aa4d * 2010-05-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@27980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-23 13:36:15 +00:00
yugui
e0e9217547 merges r27555 from trunk into ruby_1_9_1.
--
* numeric.c (fix_mul): the width of fixnum is same as long's on all
  platforms.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@27979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-23 13:36:12 +00:00
yugui
4e88735997 merges r24662 from trunk into ruby_1_9_1. This fixes #3149.
--
* lib/tempfile.rb (Tempfile#unlink): reverted r23494, since the
  usage in RubyInline is considered wrong.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@27598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-03 09:12:45 +00:00
yugui
b1809bcff1 merges r26626 and r26627 from trunk into ruby_1_9_1. This fixes #3159.
--
* ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod): fix precision.
  [ruby-core:17472][ruby-dev:35372][ruby-dev:40105][ruby-dev:40358]
--
* ext/bigdecimal/bigdecimal.c (BigDecimal_divide): fix precision too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@27597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-03 09:12:41 +00:00
yugui
4fcb855ff3 merges r26055 from trunk into ruby_1_9_1. This fixies #3164.
--
* parse.y (dyna_pop_gen): pop dvars.  [ruby-dev:39861]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@27596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-03 09:12:36 +00:00
yugui
b67fbc0789 merges r25081 from trunk into ruby_1_9_1.
fixes [ruby-core:27694], reported by Denis Defreyne.
--
* hash.c (Hash#each): Fix documentation to reflect insertion order. A patch by Run Paint Run Run [ruby-core:23644] and [ruby-core:21231]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@27595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-03 03:08:33 +00:00
svn
8fd9bb4dc6 * 2010-05-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@27594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-03 03:06:10 +00:00
yugui
b1edd258a9 merges 26005 from trunk into ruby_1_9_1.
fixes [ruby-dev:39906].
--
* configure.in: default ac_cv_prog_CC to CC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@27593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-03 03:06:07 +00:00
yugui
8acba0bc1b * string (rb_string_value): warning for implicit conversion
from Symbol to String. This behavior was introduced in r22606,
  merged in r22738 to ruby_1_9_1. It was an unexpected language
  feature change. It will be removed from Ruby in the 1.9.2.
  c.f. [ruby-dev:40274].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-04 03:50:01 +00:00
yugui
a5200c59e4 merges r22395 and r22640 from trunk into ruby_1_9_1.
--
* array.c (rb_ary_resurrect), string.c (rb_str_resurrect): new
  functions based on [ruby-dev:37983]

* insns.def (putstring, duparray): use rb_{ary,str}_resurrect().

* iseq.c (iseq_data_to_ary): needs to result TS_VALUE.
--
* iseq.c (cdhash_each): resurrects internal literals.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-04 03:49:43 +00:00
svn
9eb12e0191 * 2010-02-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-04 03:48:30 +00:00
yugui
34072faa0d merges r26052 from trunk into ruby_1_9_1.
--
* string.c (rb_str_justify): fixed the case a fill size is a
  multiple of the length of the padding.  [ruby-dev:39856]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-04 03:48:25 +00:00
yugui
3cce74dc4c merges r25605 from trunk into ruby_1_9_1.
--
* test/dl/test_dl2.rb (**) testing malloc and realloc
* ext/dl/dl.c (**) adding documentation

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:54:41 +00:00
yugui
0777c729cd merges r25579 and r25581 from trunk into ruby_1_9_1.
--
        * lib/net/http.rb (Net::HTTPResponse#each_response_header):
          accept multiline message header of HTTP response.  see #1796.
          cf. RFC 2616 '4.2 Message Header'.                          

        * test/net/http/test_httpresponse.rb: added.
--
        * lib/net/http.rb (Net::HTTPResponse#each_response_header):
          cosmetic: '?\ ' -> '?\s'

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:54:29 +00:00
yugui
a2339bc021 merges r25526,r25527,r25528,r25529,r25530 and r25555 from trunk into ruby_1_9_1.
--
* encoding.c (get_filesystem_encoding):
  add Encoding.filesystem_encoding [ruby-dev:39546]
  also see [ruby-core:25959]
--
* gem_prelude.rb (Gem.set_home):
  force_encoding(Encoding.filesystem_encoding)
  [ruby-dev:39546]

* gem_prelude.rb (Gem.set_paths): ditto.
--
Previous commit is for [ruby-core:25959]
--
* encoding.c (get_filesystem_encoding): removed.

* encoding.c (rb_locale_encindex): added.

* encoding.c (rb_filesystem_encindex): added.

* encoding.c (rb_filesystem_encindex): add an alias 'filesystem'.
  [ruby-dev:39574]

* encoding.c (enc_find): add rdoc about special aliases.

* gem_prelude.rb (Gem.set_home): use Encoding.find('filesystem').

* gem_prelude.rb (Gem.set_paths): ditto.
--
* encoding.c (enc_find): fixed rdoc formatting.
--
* ruby.c (process_options): call rb_filesystem_encoding().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:54:15 +00:00
yugui
4de39cd34e merges r25510 from trunk into ruby_1_9_1.
--
* lib/net/ftp.rb (getbinaryfile, list): call to_s to convert
  a Pathname instance into a string.  [ruby-core:26237]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:54:01 +00:00
yugui
1e8b18dfa2 merges r25499 from trunk into ruby_1_9_1.
--
* parse.y (ripper_filename): add Ripper#filename. [ruby-dev:37856] * test/ripper/test_filter.rb: add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:53:47 +00:00
yugui
8c1c150023 merges r25498 from trunk into ruby_1_9_1.
--
* gc.c (garbage_collect_with_gvl): do not garbage_collect when
  dont_gc flag turned on.  [ruby-core:26327]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:53:35 +00:00
yugui
cae4321112 merges r25494 from trunk into ruby_1_9_1.
adds a test case for the change
--
* vm.c (invoke_block_from_c): return Qnil when its iseq is
  SPECIAL CONST. [ruby-core:26335]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:53:22 +00:00
yugui
4b8d9cffdd merges r25485 from trunk into ruby_1_9_1.
--
* io.c (io_fwrite): adjust stdio file position after direct write on
  BSDish platforms.   [ruby-core:26300]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:53:10 +00:00
yugui
4d5af95020 merges tests from trunk@25460 into ruby_1_9_1.
--
* ext/dl/handle.c (rb_dlhandle_sym) refactoring rb_secure(2)
* test/dl/test_handle.rb (**) testing sym behavior

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:52:57 +00:00
yugui
0347be3e4b merges r25448 from trunk into ruby_1_9_1.
--
* ext/ext/dl/handle.c (rb_dlhandle_initialize) added rb_secure(2)
  [ruby-core:25762]
* ext/dl/dl.c (rb_dl_dlopen) removed rb_secure(2)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:52:41 +00:00
yugui
ac50396895 merges r25446 and r25466 from trunk into ruby_1_9_1.
--
* io.c (io_cntl): update max file descriptor by the result of
  fcntl(F_DUPFD).
--
* io.c (io_cntl): F_DUPFD is platform dependent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:52:27 +00:00
yugui
d7d96cdfe8 merges r25440 from trunk into ruby_1_9_1.
--
* lib/pathname.rb (Pathname::SAME_PATHS): FNM_SYSCASE is always
  non-nil.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:52:12 +00:00
yugui
e2a553e473 merges r25435 from trunk into ruby_1_9_1.
--
* test/ruby/envutil.rb (assert_in_out_err): test_stdout and
  test_stderr should be an array.

* test/ruby/test_rubyoptions.rb (test_notfound): test_stdin of
  assert_in_out_err should be a string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:51:59 +00:00
yugui
495670d273 merges r25426 from trunk into ruby_1_9_1.
--
* test/scanf/test_scanfio.rb (TestScanfIO): needs to inherit
  TestCase.

* test/scanf/test_scanfio.rb (TestScanfIO#test_io): fixed a typo.
  close test data file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:51:46 +00:00
yugui
ac2d608e51 merges r25418 from trunk into ruby_1_9_1.
--
 * added monitor.rb test. see #2240 the bug on ruby_1_8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:51:35 +00:00
yugui
687fd3a1e3 merges r25408 from trunk into ruby_1_9_1.
--
* include/ruby/win32.h (finite, scalb): inline'ed non-standard
  identifier macros.  [ruby-core:2234]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:51:24 +00:00
yugui
4edd2a5269 merges r25402,r25404,r25405,r25406 and r25407 from trunk into ruby_1_9_1.
--
* parse.y (parser_here_document): dispatch delayed heredoc
  contents.  based on a patch from Andy Keep in [ruby-core:24855].
--
* parse.y (mlhs_basic): fixed handling splat in middle of mlhs.  a
  patch from Andy Keep in [ruby-core:26163]
--
* parse.y (method_call): dispatch symbols.  a patch from Andy Keep in
  [ruby-core:26169].  [ruby-core:26165]
--
* test/ripper/test_*.rb: fixed indent.
--
* parse.y (ripper_intern): enable literal optimization.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:51:12 +00:00
yugui
be40bdbad7 * vm_method.c (rb_alias): treats an alias as if it is a newly defined
method so that oklass in a method cache refers the class on which the
  aliasing occured.
  [ruby-core:26074] (#2202).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:50:48 +00:00
yugui
d274933b13 * .gdbinit: follows r24470.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:50:24 +00:00
yugui
647b968d91 merges r25394 from trunk into ruby_1_9_1.
--
* lib/rexml/element.rb (text=): false should be converted to string.
  A patch by Teruo Oshida [ruby-dev:38351]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:50:15 +00:00
yugui
c98a51f667 merges r25392 from trunk into ruby_1_9_1.
--
Retry until the signal is trapped.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:49:35 +00:00
yugui
3ac7927ea6 merges r25388 from trunk into ruby_1_9_1.
--

* test/test_prime.rb
  (TestPrime#test_eratosthenes_works_fine_after_timeout):
  test for [ruby-dev:39465].

* lib/prime.rb (Prime::EratosthenesSieve):
  fixed [ruby-dev:39465].
  suppressed memory reallocation.
  constantified some magic numbers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:49:21 +00:00
yugui
caa2bb47b3 merges r25377 from trunk into ruby_1_9_1.
--
* st.c (unpack_entries): save table->bins and never change the table
  during unpacking. Because st_insert() may cause GC and refer the
  table, i.e. st_foreach().  [Bug #2196]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-30 12:49:10 +00:00