1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/ruby
akr 69406aad50 * encoding.c (rb_enc_precise_mbclen): new function for mbclen with
validation.

* include/ruby/encoding.h (rb_enc_precise_mbclen): declared.
  (MBCLEN_CHARFOUND): new macro.
  (MBCLEN_INVALID): new macro.
  (MBCLEN_NEEDMORE): new macro.

* include/ruby/oniguruma.h (OnigEncodingTypeST): replace mbc_enc_len
  by precise_mbc_enc_len.
  (ONIGENC_PRECISE_MBC_ENC_LEN): new macro.
  (ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND): new macro.
  (ONIGENC_CONSTRUCT_MBCLEN_INVALID): new macro.
  (ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE): new macro.
  (ONIGENC_MBCLEN_CHARFOUND): new macro.
  (ONIGENC_MBCLEN_INVALID): new macro.
  (ONIGENC_MBCLEN_NEEDMORE): new macro.
  (ONIGENC_MBC_ENC_LEN): use ONIGENC_PRECISE_MBC_ENC_LEN.

* enc/euc_jp.c: validation implemented.

* enc/sjis.c: ditto.

* enc/utf8.c: ditto.

* string.c (rb_str_inspect): use rb_enc_precise_mbclen for invalid
  encoding.
  (rb_str_valid_encoding_p): new method String#valid_encoding?.

* io.c (rb_io_getc): use rb_enc_precise_mbclen.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-06 09:28:26 +00:00
..
beginmainend.rb
endblockwarn.rb
envutil.rb
marshaltestlib.rb * test/ruby/marshaltestlib.rb: eval(sym) -> eval(sym.to_s) 2007-02-08 13:03:54 +00:00
sentence.rb * test/ruby/sentence.rb (Sentence): include Enumerable. 2007-08-24 19:01:46 +00:00
test_alias.rb * eval.c (rb_f_send): allow send/__send__ to call methods of all 2007-11-04 20:36:20 +00:00
test_array.rb * array.c (rb_ary_product): generalized product, now takes 2007-10-02 03:33:53 +00:00
test_assignment.rb * eval.c (rb_f_send): allow send/__send__ to call methods of all 2007-11-04 20:36:20 +00:00
test_basicinstructions.rb * test/ruby/test_basicinstructions.rb: updated for new class 2007-11-09 04:37:36 +00:00
test_beginendblock.rb * test_beginendblock.rb: add loop to wait signal. 2007-11-27 02:28:28 +00:00
test_bignum.rb use ML ref. for assertion message. 2007-11-18 07:18:56 +00:00
test_call.rb
test_case.rb
test_class.rb
test_clone.rb * test/ruby/test_clone.rb: fix to current spec 2007-02-08 13:32:01 +00:00
test_condition.rb
test_const.rb
test_continuation.rb * cont.c: fix to remove Fiber.new until fiber.so is not loaded. 2007-08-26 03:31:20 +00:00
test_defined.rb * compile.c, insns.def: change return value of "defined?" 2007-11-27 04:43:54 +00:00
test_dir.rb specify prefix for Dir.mktmpdir. 2007-10-24 07:11:35 +00:00
test_encoding.rb * encoding.c (rb_obj_encoding): rdoc update. a patch from David 2007-10-14 08:31:51 +00:00
test_enumerator.rb * set eol-style. 2007-11-16 01:30:29 +00:00
test_env.rb
test_eval.rb * test/ruby/test_eval.rb (TestEval::test_instance_eval_cvar): 2007-11-26 01:31:20 +00:00
test_exception.rb
test_fiber.rb * cont.c: Thread local storage should be fiber local. 2007-09-28 19:04:45 +00:00
test_file.rb use ML ref. for assertion message. 2007-11-18 07:18:56 +00:00
test_fixnum.rb * numeric.c (fix_pow): integer power calculation: 0**n => 0, 2007-07-14 14:31:21 +00:00
test_float.rb * util.c (ruby_strtod): replaced by the implementation by David 2007-08-21 20:57:48 +00:00
test_fnmatch.rb use ML ref. for assertion message. 2007-11-18 07:18:56 +00:00
test_gc.rb
test_hash.rb * hash.c (rb_hash_delete_key): delete the entry without calling block. 2007-08-15 04:50:12 +00:00
test_ifunless.rb
test_integer.rb * bignum.c (rb_cstr_to_inum): trailing spaces may exist at sqeezing 2007-12-04 02:23:52 +00:00
test_io.rb use ML ref. for assertion message. 2007-11-18 07:18:56 +00:00
test_iterator.rb * test/ruby/test_iterator.rb (TestIterator::IterTest::each): 2007-11-09 04:46:58 +00:00
test_lambda.rb * parse.y (new_yield), compile.c (iseq_compile_each): fix 2007-06-05 17:26:00 +00:00
test_literal.rb * test/ruby/test_literal.rb: new test. 2007-02-23 05:23:33 +00:00
test_m17n.rb * encoding.c (rb_enc_precise_mbclen): new function for mbclen with 2007-12-06 09:28:26 +00:00
test_marshal.rb * marshal.c (r_bytes0): check if source has enough data. 2007-10-15 00:58:09 +00:00
test_math.rb
test_method.rb * eval.c (frame_func_id): return proper method ID. 2007-08-17 16:12:03 +00:00
test_mixed_unicode_escapes.rb * parse.y: patch, based on Nobu's, work to support \u escapes 2007-11-07 22:55:27 +00:00
test_module.rb * test/ruby/test_module.rb: fix to use Symbol instead of String 2007-02-08 13:24:11 +00:00
test_objectspace.rb
test_optimization.rb * test/ruby/test_optimization.rb: restore method before calling assert_equal. 2007-02-26 15:45:52 +00:00
test_pack.rb
test_path.rb use ML ref. for assertion message. 2007-11-18 07:18:56 +00:00
test_pipe.rb
test_primitive.rb * eval.c (rb_f_send): allow send/__send__ to call methods of all 2007-11-04 20:36:20 +00:00
test_proc.rb use ML ref. for assertion message. 2007-11-18 07:18:56 +00:00
test_process.rb report the reason of process termination. 2007-11-30 08:47:22 +00:00
test_rand.rb
test_range.rb * range.c (range_dumper): make uninitialized range dumpable. 2007-09-10 06:50:22 +00:00
test_readpartial.rb * test/ruby/test_readpartial.rb: tests are working on mswin32/cygwin. 2007-02-09 02:07:34 +00:00
test_regexp.rb * eval.c (rb_method_missing): fix stack trace. 2007-11-27 01:47:34 +00:00
test_settracefunc.rb * test/ruby/test_settracefunc.rb: fixed tests for set_trace_func. 2007-11-12 15:38:10 +00:00
test_signal.rb check Process.kill instead of Process#kill. 2007-12-02 04:13:17 +00:00
test_sprintf.rb * bootstraptest/test_knownbug.rb: move fixed bugs. 2007-12-01 05:43:06 +00:00
test_string.rb * test/ruby/test_string.rb (test_splice!): tests for [ruby-dev:31665]. 2007-08-28 06:19:11 +00:00
test_stringchar.rb
test_struct.rb
test_super.rb use ML ref. for assertion message. 2007-11-18 07:18:56 +00:00
test_symbol.rb
test_system.rb use ML ref. for assertion message. 2007-11-18 07:18:56 +00:00
test_thread.rb * thread.c: fix Mutex to be interruptable lock. 2007-08-27 16:48:14 +00:00
test_time.rb * configure.in: check struct timespec, clock_gettime, utimensat, 2007-11-19 09:09:38 +00:00
test_trace.rb
test_unicode_escape.rb * include/ruby/intern.h (rb_uv_to_utf8): declared. 2007-12-01 16:56:19 +00:00
test_variable.rb * variable.c (rb_cvar_set): check whether class variable is 2007-10-03 06:48:06 +00:00
test_whileuntil.rb refine previous change. 2007-09-28 18:22:23 +00:00
test_yield.rb add test for enumerator. 2007-11-28 07:48:23 +00:00
ut_eof.rb