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

1699 Коммитов

Автор SHA1 Сообщение Дата
ryan c5746c45b2 I finally clued into the fact that test/unit's -x was for file level filtering... so that is not going into miniunit and instead goes into test/runner.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-25 06:57:05 +00:00
drbrain 858362e761 Import RDoc 2.2.1 r185
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-25 02:43:03 +00:00
nobu 00b4a3f9c4 * test: assert_raises has been deprecated since a long time ago.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 17:44:39 +00:00
xibbar 0f6375be69 * test/cgi/test_cgi_multipart.rb : revert last change.
( deprecated is assert_raises. )
* test/cgi/test_cgi_core.rb      : ditto.
* test/cgi/test_cgi_header.rb    : ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 14:43:05 +00:00
xibbar 3c419de10b * lib/cgi/core.rb (CGI::new, CGI::{accept_charset,accept_charset=}) :
accept parameters either in a hash,
  string as a block. add the encoding validation process. 
* test/cgi/test_cgi_core.rb : test for query encoding check.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 14:27:53 +00:00
akr ad50e0edb9 add a test. cf. [ruby-dev:36484].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 12:29:01 +00:00
ryan 5b91aa9746 Allow for -v and other flags to be passed through properly
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 08:50:16 +00:00
ryan 1db825a047 Added ARGV filtering for tests. Allows for multiple values
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 08:19:12 +00:00
xibbar 2798319088 * test/cgi/test_cgi_multipart.rb : test for miniunit.
* test/cgi/test_cgi_core.rb      : ditto.
* test/cgi/test_cgi_header.rb    : ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 06:25:44 +00:00
ryan 8e05c69aa1 Added changes needed for miniunit. usually from using internal calls that aren't needed anymore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 21:39:21 +00:00
tadf 74cb0507ab * test/ruby/test_rational2.rb: updated.
* test/ruby/test_complex2.rb: added.

	* test/ruby/test_complexrational.rb: added.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 12:34:35 +00:00
akr e7e5b731c2 * string.c (rb_str_casecmp): make the ordering consistent with
String#<=>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 12:27:35 +00:00
tadf 8b54d5812c * complex.c (nucomp_s_canonicalize_internal): does no apply
canonicalization rule anymore.

	* rational.c (nurat_s_canonicalize_internal(_no_reduce)?): ditto.

	* complex.c: removed class method new! and new.

	* rational.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 10:33:27 +00:00
mame f398d750ea * lib/pathname.rb (each_filename): return Enumerator if no block
given.

* test/pathname/test_pathname.rb: add a test for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 00:03:42 +00:00
matz 1c9b4b8c74 * test/ruby/test_env.rb (TestEnv#test_aset): test updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-22 23:38:04 +00:00
kouji b043284bfe * test/readline/test_readline_history.rb
(Readline::TestHistory#test_each): checked return value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-22 17:13:25 +00:00
tadf bdf81563bf * math.c (math_log): should check argc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-21 12:53:40 +00:00
tadf 72565402d9 * complex.c (nucomp_s_canonicalize_internal): checks exactness of
imag only.

	* rational.c (nurat_s_convert): accepts non real value
	  (Rational(a,b) as a/b).

	* complex.c (nucomp_s_convert): refined.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-21 01:30:25 +00:00
jeg2 280cbe0b1f * lib/csv/csv.rb: Reworked CSV's parser and generator to be m17n. Data
is now parsed in the Encoding it is in without need for translation.
* lib/csv/csv.rb:  Improved inspect() messages for better IRb support.
* lib/csv/csv.rb:  Fixed header writing bug reported by Dov Murik.
* lib/csv/csv.rb:  Use custom separators in parsing header Strings as
  suggested by Shmulik Regev.
* lib/csv/csv.rb:  Added a :write_headers option for outputting headers.
* lib/csv/csv.rb:  Handle open() calls in binary mode whenever we can to
  workaround a Windows issue where line-ending translation can cause an
  off-by-one error in seeking back to a non-zero starting position after
  auto-discovery for :row_sep as suggested by Robert Battle.
* lib/csv/csv.rb:  Improved the parser to fail faster when fed some forms
  of invalid CSV that can be detected without reading ahead.
* lib/csv/csv.rb:  Added a :field_size_limit option to control CSV's
  lookahead and prevent the parser from biting off more data than
  it can chew.
* lib/csv/csv.rb:  Added readers for CSV attributes:  col_sep(), row_sep(),
  quote_char(), field_size_limit(), converters(), unconverted_fields?(),
  headers(), return_headers?(), write_headers?(), header_converters(),
  skip_blanks?(), and force_quotes?().
* lib/csv/csv.rb:  Cleaned up code syntax to be more inline with
  Ruby 1.9 than 1.8.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-21 00:39:03 +00:00
tadf 9467d7a024 * complex.c: an instance method image has been removed and
uses "imag" instead of "image".

	* complex.c: two instance method re and im are removed.

	* rational.c: follows the above changes.

	* include/ruby/ruby.h: ditto.

	* gc.c: ditto.

	* lib/cmath.rb: ditto.

	* lib/mathn.rb: ditto.

	* lib/complex.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-20 22:49:56 +00:00
naruse e8eb95ec33 * ext/json: import JSON v 1.1.3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-20 17:41:14 +00:00
naruse cfadd72532 * parse.y: strings which contain only US-ASCII don't force to have
US-ASCII encoding. [ruby-dev:36400]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-19 23:09:33 +00:00
yugui 396650e0bd * prec.c: removed. Precision will be redesigned and be back again.
c.f. [ruby-dev:36352].

* common.mk (COMMON_OBJS): removed prec.o.

* inits.c (rb_call_inits): removed Init_Precision.

* numeric.c (Init_Numeric): removed inclusion of Precision.
  removed #induced_from from each class.

* rational.c: ditto.

* ext/bigdecimal/bigdecimal.c: ditto.

* lib/rdoc/knwon_classes.rb: removed the entry for Precision.

* test/ruby/test_prec.rb: removed.

* test/ruby/test_integer.rb: removed tests for Precision.

* test/ruby/test_fixnum.rb: ditto.

* test/ruby/test_float.rb: ditto.

* test/ruby/test_rational.rb: ditto.

* test/ruby/test_complex.rb: ditto.

* test/bigdecimal/test_bigdecimal.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-19 13:10:54 +00:00
akr 478b14ea4f * regexec.c (string_cmp_ic): add text_end argument.
(slow_search): call enclen with real string end.
  (map_search): add text_end argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-18 16:16:45 +00:00
mame e040ff5530 * ext/bigdecimal/bigdecimal.c (VpCtoV): 1E1000...000 is interpreted as
Infinity.  [ruby-dev:36159]

* ext/bigdecimal/bigdecimal.c (VpPower): Infinity ** 1 returns
  Infinity instead of NaN.  [ruby-dev:36159]

* test/bigdecimal/test_bigdecimal.rb: add tests for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-18 13:48:21 +00:00
matz c3e2e0e53f * string.c (rb_str_comparable): make ascii8bit string to be
compatible with any other encoding.

* string.c (rb_str_cmp): use rb_str_comparable() instead of
  rb_enc_compatible() since <=> is a comparison anyway.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-18 13:17:41 +00:00
akr 081c802cb9 * grapheme cluster implementation reverted. [ruby-dev:36375]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-18 12:53:25 +00:00
matz d5ec36c486 * transcode.c: add "Error" suffix for Encoding exception classes.
a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp> in
  [ruby-dev:36346].

* encoding.c (Init_Encoding): rename EncodingCompatibilityError to
  Encoding::CompatibilityError.  [ruby-dev:36366]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-18 08:57:33 +00:00
mame 2fc415a166 * test/bigdecimal/test_bigdecimal.rb: add tests to achieve over 90%
test coverage of bigdecimal.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-17 17:22:15 +00:00
akr 635b15d662 * string.c (rb_str_casecmp): don't use rb_enc_codepoint.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-17 12:50:52 +00:00
tadf d965e99b04 * complex.c (nucomp_s_convert): accepts complex
value (Complex(a,b) as a+bi).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-17 11:00:09 +00:00
kazu b452a519c9 * test/ruby/test_io.rb (TestIO#test_dup): avoid infinite loop.
[ruby-dev:36326]

* test/ruby/test_io.rb (TestIO#test_dup): remove needless open.
  [ruby-dev:35957]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-17 10:22:11 +00:00
xibbar 4ac4e2fbc4 * lib/cgi/html.rb (checkbox_group,radio_group): bug fix
use size instead of bytesize.

* test/cgi/test_cgi_tag_helper.rb: test for checkbox_group,radio_group.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-17 04:49:28 +00:00
tadf acde7364f7 * numeric.c: provides predicate real? instead of scalar?.
* complex.c: follows the above change.

	* lib/cmath.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 22:04:19 +00:00
akr 87fba4c425 * test/ruby/test_io_m17n.rb: use __FILE__ instead of /dev/null.
[ruby-dev:36327]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 17:00:08 +00:00
akr a67d4fa01c * include/ruby/oniguruma.h (OnigEncodingTypeST): add precise_ret
argument for mbc_to_code.
  (ONIGENC_MBC_TO_CODE): provide NULL for precise_ret.
  (ONIGENC_MBC_PRECISE_CODEPOINT): defined.

* include/ruby/encoding.h (rb_enc_mbc_precise_codepoint): defined.

* regenc.h (onigenc_single_byte_mbc_to_code): precise_ret argument
  added.
  (onigenc_mbn_mbc_to_code): ditto.

* regenc.c (onigenc_single_byte_mbc_to_code): precise_ret argument
  added.
  (onigenc_mbn_mbc_to_code): ditto.

* string.c (count_utf8_lead_bytes_with_word): removed.
  (str_utf8_nth): removed.
  (str_utf8_offset): removed.
  (str_strlen): UTF-8 codepoint oriented optimization removed.
  (rb_str_substr): ditto.
  (enc_succ_char): use rb_enc_mbc_precise_codepoint.
  (enc_pred_char): ditto.
  (rb_str_succ): ditto.

* encoding.c (rb_enc_ascget): check length with
  rb_enc_mbc_precise_codepoint.
  (rb_enc_codepoint): use rb_enc_mbc_precise_codepoint.

* regexec.c (string_cmp_ic): add text_end argument.
  (match_at): check end of character after exact string matches.

* enc/utf_8.c (graphme_table): defined for extended graphme cluster
  boundary.
  (grapheme_cmp): defined.
  (get_grapheme_properties): defined.
  (grapheme_boundary_p): defined.
  (MAX_BYTES_LENGTH): defined.
  (comb_char_enc_len): defined.
  (mbc_to_code0): extracted from mbc_to_code.
  (mbc_to_code): use mbc_to_code0.
  (left_adjust_combchar_head): defined.
  (utf_8): use a extended graphme cluster as a unit.

* enc/unicode.c (onigenc_unicode_mbc_case_fold): use
  ONIGENC_MBC_PRECISE_CODEPOINT to extract codepoints.
  (onigenc_unicode_get_case_fold_codes_by_str): ditto.

* enc/euc_jp.c (mbc_to_code): follow mbc_to_code field change.
  use onigenc_mbn_mbc_to_code.

* enc/shift_jis.c (mbc_to_code): ditto.

* enc/emacs_mule.c (mbc_to_code): ditto.

* enc/gbk.c (gbk_mbc_to_code): follow mbc_to_code field and
  onigenc_mbn_mbc_to_code change.

* enc/cp949.c (cp949_mbc_to_code): ditto.

* enc/big5.c (big5_mbc_to_code): ditto.

* enc/euc_tw.c (euctw_mbc_to_code): ditto.

* enc/euc_kr.c (euckr_mbc_to_code): ditto.

* enc/gb18030.c (gb18030_mbc_to_code): ditto.

* enc/utf_32be.c (utf32be_mbc_to_code): follow mbc_to_code field
  change.

* enc/utf_16be.c (utf16be_mbc_to_code): ditto.

* enc/utf_32le.c (utf32le_mbc_to_code): ditto.

* enc/utf_16le.c (utf16le_mbc_to_code): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 16:48:05 +00:00
xibbar 49f69c3f2e * lib/cgi/core.rb: performance improvement.
From CGIAlt http://cgialt.rubyforge.org/

* test/cgi/test_cgi_header.rb: exception class fixed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 13:30:05 +00:00
tadf 7c3b57b5d1 * complex.c (nucomp_marshal_{dump,load}): preserve instance
variables.

	* rational.c (nurat_marshal_{dump,load}): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 10:21:23 +00:00
matz 377eb14a9f * string.c ():
* string.c ():

* string.c (single_byte_optimizable): make function inline.  based
  on a patch from Michael Selig <michael.selig at fs.com.au> in
  [ruby-core:18532].

* string.c (str_modify_keep_cr): new function act as
  rb_str_modify(), but don't clear coderange

* string.c (rb_str_casecmp): specialized for single byte strings.

* string.c (rb_str_splice): preserve coderange.

* string.c (rb_str_slice_bang, rb_str_reverse_bang,
  rb_str_upcase_bang, rb_str_downcase_bang, tr_trans,
  rb_str_capitalize_bang, rb_str_swapcase_bang,
  rb_str_delete_bang, rb_str_chop_bang, rb_str_chomp_bang,
  rb_str_lstrip_bang, rb_str_rstrip_bang): ditto.

* string.c (rb_str_clear): preset coderange.

* string.c (rb_str_split_m): specialized for splitting with a
  string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 00:47:20 +00:00
matz 326bf1cac3 * test/ruby/test_io.rb (TestIO#test_dup): exception should be
raised from IO#dup.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 00:21:32 +00:00
matz 542f76c6cd * test/ruby/test_io.rb (TestIO#test_dup): this test might fail if
there are any garbage IO objects.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15 23:37:05 +00:00
akr 9e10d51c40 add assertion message for previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15 16:24:39 +00:00
akr 2e0a116dd5 * re.c (rb_reg_quote): use rb_enc_mbcput to generate ASCII
incompatible characters properly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15 16:01:08 +00:00
naruse 5fc383f9a3 * encoding.c (rb_enc_compatible): accepst other than strings and
regexps. [ruby-core:18595]

* encoding.c (rb_enc_get_index): works files and encodings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15 05:17:18 +00:00
tadf 05ac51d225 * complex.c (nucomp_eql_p): new.
* complex.c (nucomp_hash): should use hash values of the elements.

	* rational.c (nurat_hash): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15 04:20:46 +00:00
yugui 1cda105886 * test/matrix/test_matrix.rb (setup): typo.
(test_equality): misdefinition of the expected working.
  Reported by an anonymous user.
  (test_hash): added.

* test/matrix/test_vector.rb: ditto.
Mon Sep 15 03:33:10 2008  Tanaka Akira  <akr@fsij.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15 01:33:43 +00:00
nobu 2f67b43aec * transcode.c (str_encode): returns duplicated string if nothing
changed.  [ruby-core:18578]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-14 17:37:35 +00:00
yugui 406500cc8b * lib/matrix.rb (Vector#eql?): typo of the method name as "eqn?".
(Vector#eqn?): removed. Defined by mistake.
  Fixes [ruby-dev:36294]. Reported by weda <weda AT
  issp.u-tokyo.ac.jp> and an anonymous user.

* test/matrix/test_matrix.rb: added.

* test/matrix/test_vector.rb: added.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-14 07:15:55 +00:00
tadf e4b3a81769 * complex.c (f_{add,mul,sub}): omitted some shortcuts for preserve
signed zero anyway.

	* complex.c (nucomp_negate): new.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-14 01:16:44 +00:00
tadf 5ac09d7627 * complex.c: refined.
* rational.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-13 01:55:56 +00:00