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

2570 Коммитов

Автор SHA1 Сообщение Дата
mame 0f078cbfc4 * test/ruby/test_dir.rb: get rid of debug print.
* test/ruby/test_module.rb: fixed to make test-all work.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-22 15:24:22 +00:00
mame bebd7e4511 * test/ruby/test_array.rb: add a test for Array#rotate, rotate!.
* test/ruby/test_dir.rb, test/ruby/test_fnmatch.rb: add some tests
  (for coverage of dir.c).

* test/ruby/test_enum.rb: add a test for Enumerable#minmax.

* test/ruby/test_enumerator.rb: add some tests for Enumerator#inspect,
  Enumerator::Generator and Yielder.

* test/ruby/test_env.rb: add a test for ENV#index.

* test/ruby/test_exception.rb: add some tests (for coverage of
  error.c).

* test/ruby/test_hash.rb: add a test for recursive check.

* test/ruby/test_integer.rb: add a test for number of argument of
  Integer.

* test/ruby/test_method.rb: add a test for define_method.

* test/ruby/test_module.rb: add a test for constant of included
  module.

* test/ruby/test_proc.rb: add a test for parameters with cfunc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-22 15:03:32 +00:00
mame d8d5e67184 * test/ruby/test_regexp.rb, test/ruby/test_symbol.rb,
test/ruby/test_variable.rb: add some tests (for coverage of
  compile.c).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-22 14:53:12 +00:00
akr 1d674dc547 * time.c (time_mload): add submicro into vtm.subsecx. [ruby-dev:40133]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-22 12:08:02 +00:00
mame 45c2671e37 * test/ruby/test_bignum.rb, test/ruby/test_class.rb,
test/ruby/test_defined.rb, test/ruby/test_hash.rb,
  test/ruby/test_primitive.rb, test/ruby/test_variable.rb: add some
  tests (for coverage).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-21 16:08:40 +00:00
mame f3448ded9d * test/ruby/test_require.rb (test_define_class): expect TypeError
instead of NameError.  [ruby-core:27504]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-21 16:06:39 +00:00
nobu 8a4c9b0b77 * array.c (rb_ary_rotate): new methods, Array#rotate! and
Array#rotate.  [ruby-dev:17194]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-21 02:15:48 +00:00
tenderlove 4395758903 * ext/zlib/zlib.c: added Zlib.crc32_combine and Zlib.adler32_combine
* test/zlib/test_zlib.rb: corresponding tests [ruby-core:27551]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-19 00:06:04 +00:00
mame 77f3fc3054 * test/ruby/test_array.rb: add some tests (for coverage).
* test/ruby/test_bignum.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18 17:03:16 +00:00
mame 34b93543fc * test/ruby/test_bignum.rb: some coerce definitions (for test) was
wrong.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18 17:00:55 +00:00
mame 6b438bee04 * parse.y (top_compstmt, top_stmts, top_stmt): prohibit BEGIN {} in
non-toplevel scope.  [ruby-core:21657]

* test/ruby/test_beginendblock.rb (test_begininclass): add a test for
  above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18 16:43:29 +00:00
nobu f00951bb25 * lib/webrick/httpservlet/filehandler.rb (make_partial_content):
add bytes-unit.  [ruby-dev:40030]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18 08:16:07 +00:00
nobu 9c54d38d60 * test/webrick/test_cgi.rb: require util.rb first to override the
executable name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-18 07:50:08 +00:00
knu d8f265b332 * ext/digest/digest.c (rb_digest_instance_hexdigest_bang): Fix
rdoc.

* ext/digest/lib/digest.rb (Digest::Class.base64digest)
  (Digest::Instance#base64digest{,!}): New methods.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-17 19:12:10 +00:00
naruse 8a73c0ec5f Fix test when default_external is US-ASCII.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-16 16:53:17 +00:00
nobu 441dbecf43 * string.c (rb_str_concat): fixed range check for Fixnum, and
added checks for integer overflow and invalid char code.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-14 03:50:39 +00:00
akr 4bf4ddb693 * time.c (time_to_r): convert to rational if internal representation
is not rational.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-13 23:51:16 +00:00
akr d5a96ece85 * time.c (time_mdump): use nano_num and nano_den instead of subnano to
avoid Rational class in marshaled data which prevent unmarshal by
  Ruby 1.8.
  (time_mload): use nano_num and nano_den.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-13 19:04:17 +00:00
akr 55a4c972df add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-13 17:00:48 +00:00
kou 06dfb68d54 * lib/rss/maker/base.rb, test/rss/test_maker_0.9.rb:
accept any time format in maker. [ruby-core:26923]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 14:52:11 +00:00
nobu 8f3f9d715f * test/ruby/envutil.rb (EnvUtil#rubybin): fake also rbconfig.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 07:41:40 +00:00
wanabe a6b81a6b6e * test/ruby/test_process.rb (test_execopts_env): MANDATORY_ENVS might
not be a part of ENV.  e.g. TMPDIR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 07:12:12 +00:00
akr 8001de1434 add ML ref.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 00:59:27 +00:00
akr e1b928c598 delete RUBYLIB for ruby spawned in test_no_curdir.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 00:39:06 +00:00
akr 853dd6cabe * prelude.rb (require_relative): use File.realpath. [ruby-dev:40040]
* include/ruby/intern.h: declare rb_dir_getwd.

* dir.c (rb_dir_getwd): copied from dir_s_getwd to export.
  (dir_s_getwd): use rb_dir_getwd.

* file.c (rb_file_s_realpath): new method File.realpath.
  (rb_file_s_realdirpath): new method File.realdirpath.

* lib/pathname.rb (Pathname#realpath): use File.realpath.
  (Pathname#realdirpath): use File.realdirpath.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 00:32:22 +00:00
akr f86cca6f55 add ML ref.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-11 18:21:47 +00:00
akr 7c6df6dc17 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-11 18:15:25 +00:00
knu 8c801be9bf Make sure that ENV.[]= fails when an invalid variable name is given.
Fix this if there is an environment where a variable name containing
an '=' is allowed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-11 13:42:56 +00:00
shyouhei 73cd7b6697 * lib/webrick/accesslog.rb : Escape needed.
* lib/webrick/httpstatus.rb : ditto.

	* lib/webrick/httprequest.rb : ditto.

	* lib/webrick/httputils.rb : ditto.

	* test/webrick/test_cgi.rb (TestWEBrickCGI::test_bad_): Test for it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-10 09:33:47 +00:00
tenderlove 8d3498f94b * test/yaml/test_struct.rb Test for dealing with structs that have
instance variables

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-09 22:11:35 +00:00
nobu 655cb34f17 * lib/matrix.rb (Matrix#inverse_from): use #quo. backported r9490.
* lib/matrix.rb (Matrix#determinant): ditto.  [ruby-core:27507]

* lib/matrix.rb (Matrix#rank): ditto.

* lib/matrix.rb (Matrix::Scalar#initialize): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-09 20:35:28 +00:00
mame 8e8bb6c173 * proc.c (mnew): don't check visibility of method body if public
ZSUPER method is found.  [ruby-dev:39767]

* test/ruby/test_method.rb: add a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-08 14:40:38 +00:00
mame 479a3c4c8b * vm_method.c (rb_alias): skip ZSUPER method when searching body of
source method.  [ruby-dev:39760]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-08 14:10:58 +00:00
nobu 902b109465 * marshal.c (w_symbol): dump no encoding for 7bit only coderange
symbol.  [ruby-core:27375]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-08 04:12:29 +00:00
ryan 06925a0952 Imported minitest 1.5.0 r5596
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-06 22:58:07 +00:00
kazu 84c25ece86 * test/ruby/test_exception.rb: add a test. cf [ruby-dev:39116]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-05 10:34:00 +00:00
akr 50b8893d56 * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder#inspect):
implemented.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-02 16:31:00 +00:00
akr c0b4e90f08 * tool/mkconfig.rb: generate RbConfig.ruby in rbconfig.rb.
* lib/webrick/httpservlet/cgihandler.rb: use RbConfig.ruby.

* test/ruby/envutil.rb: ditto.

* benchmark/report.rb: ditto.

* benchmark/runc.rb: ditto.

* tool/eval.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-31 15:00:04 +00:00
naruse 7ed0640ffb Add Float::INFINITY and Float::NAN.
* numeric.c (Init_Numeric): Add Float::INFINITY and Float::NAN.
  [ruby-dev:1657] [ruby-dev:4760] [ruby-list:7023] [ruby-list:46690]
  [ruby-core:26632] [ruby-talk:41352] [ruby-talk:203333]

* include/ruby/defines.h (INFINITY): defined.

* include/ruby/defines.h (NAN): defined.

* include/ruby/util.h (ruby_div0): removed.

* numeric.c (fix_pow): use INFINITY and NAN instead of ruby_div0(1.0).

* marshal.c (r_object0): ditto.

* bignum.c (big_fdiv): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-29 07:05:39 +00:00
nobu cff7d0c80e * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::STANDALONE):
any number spaces can be placed between equal-sign and the value.
  patch from Ed Howland in [ruby-core:27345].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-29 01:36:26 +00:00
nahi 26269cbd5d * test/ruby/test_marshal.rb: added tests for taintness/untrustness
propagation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-28 13:01:28 +00:00
suke b3c318bffd * ext/win32ole/win32ole.c (foleparam_initialize): add foleparam_initialize
to check argument of WIN32OLE_PARAM.new

* test/win32ole/test_win32ole_param.rb (test_s_new): add some assertion
  to test WIN32OLE_PARAM.new


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-27 01:51:54 +00:00
akr cbfdacdd36 add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-25 12:38:16 +00:00
nobu e6a8408c2c * iseq.c (iseq_s_disasm): return nil for native methods.
[ruby-core:27226], [Bug#2499]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-23 06:22:48 +00:00
nobu d3fc1d3e3a * test/drb/drbtest.rb (DRbService.add_service_command): quotes
rubybin only, not including -d.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-23 01:31:37 +00:00
nobu 99bf251b69 * test/ruby/test_thread.rb (test_priority): removed not-guaranteed result.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-23 01:24:33 +00:00
nobu 738515d12b * test/cgi: check by Encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-23 00:14:48 +00:00
nobu da861d79b7 * test/cgi/test_cgi_multipart.rb (CGIMultipartTest#_prepare):
always must be binary mode.  c.f. Bug#2341


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-23 00:12:33 +00:00
akr 8d7677b498 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-22 14:02:13 +00:00
naruse 35230b1a78 Add a test for [ruby-core:27247]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-21 09:17:55 +00:00