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

2154 Коммитов

Автор SHA1 Сообщение Дата
naruse 3ab17047f5 * enc/trans/japanese.c: add workarround for Unicode to CP932.
U+2015->0x815C, U+2225->0x8161, U+FF0D->0x817C, U+FF3C->0x815F,
  U+FF5E->0x8160, U+FFE0->0x8191, U+FFE1->0x8192, U+FFE2->0x81CA

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-28 04:35:59 +00:00
usa ea16f7dfc9 * file.c (BUFCHECK): wrong condition. [ruby-core:16921]
* file.c (file_expand_buf): shouldn't use buflen for length of string.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-27 03:07:55 +00:00
knu 49cd417578 * hash.c (env_each_value): Do not call env_values() twice.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-25 15:42:14 +00:00
ko1 59c061235f * eval_method.c: renamed from vm_method.c. "vm_method.c" is included
by "vm.c".
* vm_eval.c: added.  Some codes are moved from "eval.c"
* common.mk: fix for above changes.
* compile.c: make a vm_eval(0)
* eval.c, eval_error.c, eval_intern.h, eval_jump.c, proc.c, vm.c,
  id.c, id.h, vm_core.h, vm_dump.c, vm_evalbody.c, vm_insnhelper.c,
  blockinlining.c: fix for above changes.  and do some refactoring.
  this changes improve rb_yield() performance.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-24 17:50:17 +00:00
naruse 327515a95b * transcode.c (rb_str_transcode): argc is 1, and argv is &to.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-23 23:15:14 +00:00
ko1 a45cd8a01c * eval.c, eval_intern.h, include/ruby/intern.h, include/ruby/ruby.h,
vm.c, vm_core.h, vm_insnhelper.c: remove pointless "const".



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 16:19:14 +00:00
ko1 4c094940aa * insns.def, vm_insnhelper.c: specify "const".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21 15:18:15 +00:00
naruse 95698ff2a4 * transcode.c, include/ruby/encodng.h (rb_str_transcode):
C API of encoding conversion for Ruby object.
  VALUE rb_str_transcode(VALUE str, VALUE to).

* transcode.c (str_encode, str_encode_bang):
  rename from rb_tr_transcode or rb_str_transcode_bang.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 16:37:13 +00:00
mame 2d9135f7a8 * parse.y (assignable_gen): when "self = 1" was evalueted, unnecessary
error message was output, which might cause null pointer access.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19 16:14:30 +00:00
ko1 950ee3e0a6 * version.h: fix strange change by version.h update tool.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19 05:33:45 +00:00
ko1 385f0e8af6 * vm.c, insns.def, eval.c, vm_insnhelper.c: fix CREF handling.
VM value stack frame of block contains cref information.
  (dfp[-1] points CREF)
* compile.c, eval_intern.h, eval_method.c, load.c, proc.c,
  vm_dump.h, vm_core.h: ditto.
* include/ruby/ruby.h, gc.c: remove T_VALUES because of above
  changes.
* bootstraptest/test_eval.rb, test_knownbug.rb: move solved test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19 03:08:50 +00:00
mame a0e236f606 * pack.c (pack_pack): check errno to detect error of ruby_strtoul.
* pack.c (pack_unpack): ditto.

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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-17 17:56:41 +00:00
matz c39e8c6e85 * array.c (rb_ary_sort_bang): stop memory leak. [ruby-dev:34726]
* re.c (rb_reg_search): need to free allocated buffer in re_register.

* regexec.c (onig_region_new): more pedantic malloc check.

* regexec.c (onig_region_resize): ditto.

* regexec.c (STATE_CHECK_BUFF_INIT): ditto.

* regexec.c (onig_region_copy): use onig_region_resize.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-16 18:27:01 +00:00
matz f970ffedae * math.c (to_flo): rb_Float() accepts even strings for input.
* complex.c (nucomp_to_f): fix wrong message.

* complex.c (nucomp_to_r): ditto.

* object.c (rb_Float): do not check NaN for error.  NaN is a part
  of valid float values.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-16 04:17:45 +00:00
nobu 22361a3d1c * file.c (file_expand_path): support for alternative data stream
and ignored trailing garbages of NTFS.

* file.c (rb_file_s_basename): ditto.

* file.c (rb_file_s_extname): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-15 06:34:02 +00:00
mame 4bb3fa6982 * eval_method.c (rb_add_method): fix check for warning when
Object#initialize is redefined. (same as 1.8)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-13 15:49:38 +00:00
matz 5f0e8f582b * string.c (rb_str_cat): fixed buffer overrun reported by
Christopher Thompson <cthompson at nexopia.com> in [ruby-core:16746]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-13 01:13:55 +00:00
nobu 669d43780e * gem_prelude.rb (load_full_rubygems_library, const_missing): prevent
infinite recursion.  [ruby-dev:34539]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12 01:51:47 +00:00
matz e08f245464 * string.c (tr_trans): should check src size, not str size.
[ruby-dev:34637]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-10 17:10:10 +00:00
matz 9139a48f0e * string.c (rb_str_each_line): zero length record separator should
split a string into paragraphs.  [ruby-dev:34586]

* string.c (rb_str_each_line): RDoc updated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-10 09:17:59 +00:00
matz 2acb400eb1 * parse.y (arg): operator assignment "a += b rescue c" should be
parsed as "a += (b rescue c)" just like normal assignment.
  [ruby-talk:301000]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08 15:54:32 +00:00
matz 60219a0aa3 * string.c (tr_trans): should squeeze properly. [ruby-dev:34587]
* string.c (tr_trans): had a bug in treating multi-byte character
  replacement. 

* string.c (rb_str_delete_bang): need not to do anything for empty
  strings. 

* test/ruby/test_m17n_comb.rb (TestM17NComb::test_str_delete): add
  test for empty receiver.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 16:15:45 +00:00
matz 86dfbd3c47 * ext/zlib/zlib.c (gzreader_gets): may cause infinite loop.
[ruby-reference-manual:762]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-06 15:56:21 +00:00
matz 837c76bd7b * compile.c (iseq_compile_each): should call compile_cpath() for
modules as well.  [ruby-dev:34585]

* insns.def (defineclass): add undef handling.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 15:01:42 +00:00
matz a823fc5d8b * compile.c (compile_cpath): use Qundef to denote cbase lookup.
* insns.def (defineclass): Qudef is passed for cbase.

* insns.def (setconstant): ditto.

* vm_insnhelper.c (vm_check_if_namespace): use rb_inspect()
  instead of rb_obj_as_string() for better description.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 02:27:29 +00:00
matz f34a75657d * re.c (Init_Regexp): remove MatchData#select. [ruby-dev:34563]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 04:57:19 +00:00
usa 4379884371 * 2008-05-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-01 00:25:45 +00:00
usa d7e28fd0fe * 2008-04-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-30 05:58:17 +00:00
matz 3d751cde0f * proc.c (method_name): should return symbols instead of strings.
[ruby-dev:34531]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-28 02:12:21 +00:00
naruse fe0446cc01 * ruby.c (ruby_set_argv): ARGV should be locale encoding.
[ruby-list:44861]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26 23:08:38 +00:00
usa e72b9cbc44 * 2008-04-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-25 15:55:54 +00:00
usa 963941b156 * 2008-04-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-25 01:35:36 +00:00
matz ae6782315a * ruby.c (process_options): set safe_level before loading script.
[ruby-dev:34421]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-24 08:20:56 +00:00
mame f7ef694a71 * test/ruby/test_settracefunc.rb: add a test for set_trace_func.
* test/ruby/envutil.rb: move "rubyexec" method from test_rubyoptions.rb.

* test/ruby/test_rubyoptions.rb: use rubyexec in envutil.rb.

* test/ruby/test_thread.rb: add tests to achieve over 90% test coverage
  of thread.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-23 15:22:13 +00:00
kazu 77f987376c * test/ruby/test_symbol.rb (TestSymbol#test_to_proc): Improve tests of Symbol#to_proc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 15:23:01 +00:00
usa 915b5c5508 * file.c (eaccess): workaround for recent msvcrt's behavior.
[ruby-core:16460]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 00:58:04 +00:00
usa fd8734a64d * gc.c (ruby_xmalloc): use size_t for malloc argument instead of long.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 23:55:09 +00:00
nobu f4f95b98d4 * compile.c (iseq_compile_each): fix for splat in when and rescue.
a patch from wanabe <s.wanabe AT gmail.com> in [ruby-dev:34429].
  [ruby-core:14537]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 05:44:47 +00:00
usa 38af102ccc * 2008-04-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-17 15:22:18 +00:00
mame 4133458dee * test/ruby/test_process.rb (test_rlimit_nofile): reset RLIMIT_NOFILE
before exit (for gcov).
* test/ruby/test_rubyoptions.rb: new tests for option of ruby
  interpreter, to achieve over 95% test coverage of ruby.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-16 15:48:54 +00:00
nobu 73437c05f5 * ruby.c (process_options): dln_find_file returns the pointer to a
static buffer, so should copy it.  [ruby-dev:34409]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 17:26:29 +00:00
matz fee4ed204f * re.c (rb_reg_search): make search reentrant. [ruby-dev:34223]
* test/ruby/test_parse.rb (TestParse::test_global_variable):
  should preserve $& variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14 15:47:51 +00:00
mame 0327a222c4 * test/ruby/test_parse.rb: add tests to achieve over 95% test coverage
of parse.y.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-13 15:52:14 +00:00
nobu 31a060f7bd * thread_pthread.c (lock_func): should not check interrupts in
blocking region.  [ruby-dev:34378]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-13 09:52:29 +00:00
nobu 23bb4d7898 * file.c (rb_file_s_basename, rb_file_s_dirname, rb_file_s_extname):
copy encoding.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11 18:12:18 +00:00
matz 4a407ec3a7 * marshal.c (w_object): add volatile to avoid potential GC bug. a
patch from Tomoyuki Chikanaga <chikanag at nippon-control-system.co.jp>
  in [ruby-dev:34311].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 23:10:49 +00:00
nobu eb18a827fb * thread_pthread.c (native_sleep): sleep_cond is initialized at
creation.  [ruby-Patches-19361].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 01:27:25 +00:00
nobu 5098d7ae0d * test/ruby/test_thread.rb: new tests from Sylvain Joyeux in
[ruby-Patches-19361].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-09 03:12:03 +00:00
nobu 37504dc560 * load.c (rb_provided): check expanded path for relative path
features, loading or loaded features are already expanded in 1.9.

* variable.c (rb_autoload_load): no needs to check if provided before
  rb_require_safe.  [ruby-dev:34266]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-07 18:39:28 +00:00
matz bdc00ba604 * bignum.c (rb_cmpint): moved from compar.c, to check bignum
zero.

* range.c (range_step): add step for each iteration if begin and
  end are numeric.  [ruby-core:15990]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-06 17:11:50 +00:00
nobu 0b3a667f53 * dir.c (dir_tell): check if closed. [ruby-core:16223]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-06 00:45:02 +00:00
matz 2b8af7d624 * re.c (rb_memsearch_qs): wrong boundary condition. a patch from
wanabe <s.wanabe AT gmail.com> in [ruby-dev:34248].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-04 05:13:06 +00:00
nobu 5c1926ac82 * compile.c (iseq_set_sequence, iseq_insns_unification,
insn_data_to_s_detail): constified.

* iseq.c (insn_operand_intern, ruby_iseq_disasm_insn): ditto.

* template/{insns_info,opt_sc,optunifs}.inc.tmpl: ditto.

* tool/instruction.rb (OptUnifsIncGenerator): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-03 00:00:48 +00:00
matz f67f196b1d * rational.c (nurat_int_check): function for DRY integer check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-02 13:31:42 +00:00
nobu 29b538fa71 * lib/resolv.rb (Resolv::Config.default_config_hash): requires
win32/resolv to use Win32::Resolv.  [ruby-dev:34138]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-31 16:55:54 +00:00
naruse 839dc7f9ab * io.c (io_getc): set coderange while getting characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-30 19:16:29 +00:00
matz ef260b085e revert git backfire in r15860; sorry
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-30 15:00:12 +00:00
matz 3730710d79 * proc.c (proc_dup): should copy is_lambda attribute as well.
[ruby-talk:296244]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-30 14:50:55 +00:00
nobu a367738381 * 2008-03-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-29 12:42:31 +00:00
usa a099df6bbf * 2008-03-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-28 11:23:08 +00:00
mame 43a2aaea2f * test/ruby/test_rational.rb: add tests to achieve over 90% test
coverage of rational.c.

* test/ruby/test_complex.rb: ditto for complex.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-25 15:30:56 +00:00
nobu f2025c33ff * compile.c (compile_massign_opt): no need to use alloca.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-25 06:09:38 +00:00
nobu 1b6572295a * configure.in: sitearch should use target_cpu. [ruby-core:15986]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-24 01:25:56 +00:00
mame b9fd3e4e85 * complex.c (nucomp_sub, nucomp_expt): call corresponding functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-20 16:41:51 +00:00
nobu 42522ee2a6 * io.c (argf_tell, argf_seek_m, argf_set_pos, argf_rewind,
argf_fileno, argf_to_io, argf_eofl, argf_getc, argf_getbyte,
  argf_readchar, argf_readbyte, argf_each_line): use receiver.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-19 15:14:01 +00:00
matz f55963c939 * regint.h (CHECK_INTERRUPT_IN_MATCH_AT): add interrupt check
during match.  [ruby-talk:295002]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-19 01:19:29 +00:00
naruse e58adeae0f * re.c (rb_memsearch_ss): simple shift search.
* re.c (rb_memsearch_qs): quick search.

* re.c (rb_memsearch_qs_utf8): quick search for UTF-8 string.

* re.c (rb_memsearch_qs_utf8_hash): hash functions for above.

* re.c (rb_memsearch): use above functions.

* string.c (rb_str_index): give enc to rb_memsearch.

* include/ruby/intern.h (rb_memsearch): move to encoding.h.

* include/ruby/encoding.h (rb_memsearch): move from intern.h.

* common.mk (PREP): add dependency.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-17 19:04:29 +00:00
nobu a4394e3f49 * configure.in: unset GREP_OPTIONS. [ruby-core:15918]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-17 07:41:12 +00:00
naruse 9e202f9398 * common.mk (LIBRUBY_SO): add dependency to $(BUILTIN_ENCOBJS).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-16 08:31:00 +00:00
matz 2694b2f937 * encoding.c (rb_enc_associate_index): pass unnecessary enc_capable().
* string.c (rb_str_cmp): reduce invocation of rb_enc_compatible().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-15 09:19:38 +00:00
matz c7bea6f6e7 * numeric.c (fix_divmod): should return integer division. [ruby-dev:34006]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-13 16:37:54 +00:00
nobu db49143cda * configure.in (stdint.h): check if presence.
* configure.in (uint32_t): check if defined.

* string.c (hash): fix for portability.  [ruby-dev:34020]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-12 16:45:28 +00:00
matz 8f14847366 * array.c (rb_ary_combination): argument check before creating
Enumerator.

* array.c (rb_ary_permutation): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-11 16:15:14 +00:00
matz 8149168db6 * ruby.c (usage): remove some unimportant lines to fit -h message
in a page.  [ruby-dev:34018]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-10 15:47:47 +00:00
naruse f55b10c001 * string.c (rb_str_index): if t == s + pos, the character beginning
from s + pos is valid.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-09 18:51:46 +00:00
naruse a39feece85 * string.c (search_nonascii): Use VALUE instead of unsigned long
because VALUE can be the fastest unsigned integer type.
  On LLP64 unsigned long isn't the fastest.
* string.c (str_strlen): ditto.
* string.c (str_utf8_nth): ditto.
* string.c (count_utf8_lead_bytes_with_ulong): ditto.

* string.c (count_utf8_lead_bytes_with_word): renamed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-08 09:05:34 +00:00
usa 643d2bad07 * 2008-03-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-07 10:22:10 +00:00
nobu 79cdf2ffa2 * struct.c (make_struct): preserve encoding of struct name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 15:31:42 +00:00
matz 413db1b036 * lib/debug.rb: require 'continuation' to implement "restart"
command.  [ruby-dev:33992]

* lib/debug.rb (Context::debug_command): remove local variable
  shadowing to shut up warnings.  [ruby-dev:33992]

* lib/debug.rb (Context::display_list): ditto.

* lib/debug.rb (Context::resume): ditto.

* lib/debug.rb (Context::get_thread): no longer use #index for Hash.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 02:52:43 +00:00
naruse 8ac9b7c2ed * io.c (open_key_args): use rb_io_open instead of rb_f_open.
[ruby-core:15746]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-03 20:34:58 +00:00
nobu 9b2dd1e20d * hash.c (rb_any_hash): shrinks all results in Fixnum range.
[ruby-core:15713]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-03 07:14:27 +00:00
nobu b4b3180bfa * object.c (rb_cstr_to_dbl): check for successive underscores.
[ruby-dev:33952]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-01 15:08:13 +00:00
nobu cd89edc065 * encoding.c (rb_enc_dummy_p): bootstrap encodings can not be dummy.
* encoding.c (rb_enc_ascget): no needs to call rb_enc_precise_mbclen()
  twice.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-29 15:29:09 +00:00
naruse 50a860d006 * string.c (str_new): remove encoding assumption of empty string.
* hash.c ( rb_f_getenv, env_fetch, env_inspect): result of ENV should
  be always ASCII-8BIT.

* object.c (nil_to_s): nil.to_s should be US-ASCII.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-28 18:13:45 +00:00
nobu c015c6fa8e * include/ruby/encoding.h (rb_str_coderange_scan_restartable): added
prototype.

* string.c (rb_str_coderange_scan_restartable, rb_str_times): removed
  unsed variables.

* string.c (rb_enc_str_copy): unused now.  may be used in future?


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-28 02:13:51 +00:00
naruse 4dd9fd71b3 * string.c (rb_str_coderange_scan_restartable): coderange scaning
for partial read.

* io.c (read_all): set coderange when not convert encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-27 15:19:22 +00:00
nobu 9d014dc254 * ext/extmk.rb, enc/make_encmake.rb: load current mkmf.rb even if
cross-compiling.

* ext/extmk.rb, enc/make_encmake.rb, lib/mkmf.rb: need to be 1.8
  compatible for cross-compiling.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-26 18:56:00 +00:00
usa 116b15765d * 2008-02-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-26 00:09:17 +00:00
nobu f0ca4e868d * 2008-02-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-25 13:39:49 +00:00
nobu fe80dd73b9 * util.c (valid_filename): use O_EXCL to get rid of clobbering
existing files in race conditions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-23 18:53:00 +00:00
nobu 23ac9d7035 * 2008-02-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-23 02:52:38 +00:00
nobu 80e81d283d * enc/{depend,make_encdb.rb,trans/make_transdb.rb}: sort in alpha-numeric order.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-22 00:07:23 +00:00
matz ca22f3e168 * io.c (rb_f_putc): invoke stdout method so that redefining putc
may take effect.   [ruby-talk:291844]

* io.c (rb_f_puts): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-21 07:47:12 +00:00
nobu e16fddf1a9 * configure.in (RPATHFLAG): -R option of HP-UX ld is not for runtime
load path.  [ruby-list:44600]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-20 15:01:36 +00:00
usa f761aacdd8 * io.c (open_key_args): set arg->io even if no options passed.
[ruby-dev:33072]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-20 01:09:21 +00:00
nobu b81a66d1ef * eval.c (ruby_exec_node): no thread starts inside iseq compilation.
* eval.c (rb_f_raise): skip current control frame.  [ruby-core:15589]

* insns.def (opt_div): raise as the ordinary method. [ruby-core:15589]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-19 02:14:14 +00:00
usa 57ae6ad003 * 2008-02-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-17 17:00:09 +00:00
usa 5b461c6996 * win32/resource.rb: made version infos confirm to OS spec.
* {bcc32,win32}/Makefile.sub (*.rc): add dependency.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-16 18:16:21 +00:00
nobu 9c0be2d516 * range.c (rb_range_beg_len): check if responds to "begin" and "end"
methods for non-Range object.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-15 15:21:51 +00:00
nobu 82f631ac57 * configure.in (sigsetmask): check when signal semantics is not POSIX.
* signal.c (USE_TRAP_MASK): set true if sigprocmask or sigsetmask is
  available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-14 17:40:56 +00:00
nobu c9c655bf2c * common.mk (INSTRUBY_ARGS): pass mode to install. [ruby-dev:33766]
* instruby.rb (parse_args): added --data-mode and --prog-mode options.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-13 15:49:56 +00:00
nobu 8a87655162 * parse.y (arg_add_gen): removed since identical to arg_append_gen.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12 16:23:02 +00:00
matz 0472db84c5 * range.c (range_include): specialize single character string
case (e.g. (?a ..?z).include(?x)) for performance.
  [ruby-core:15481]

* string.c (rb_str_upto): specialize single character case.

* string.c (rb_str_hash): omit coderange scan for performance.

* object.c (rb_check_to_integer): check Fixnum first.

* object.c (rb_to_integer): ditto.

* string.c (rb_str_equal): inline memcmp to avoid unnecessary
  rb_str_comparable(). 

* parse.y (rb_intern2): use US-ASCII encoding.

* parse.y (rb_intern_str): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-11 17:46:52 +00:00
mame 65753a5838 * test/ruby/test_pack.rb: fix tests for 64bit CPU.
* test/ruby/test_bignum.rb: ditto.

* test/ruby/test_file_exhaustive.rb: ditto.

* test/ruby/test_integer.rb: ditto.

* test/ruby/test_time.rb: ditto.

* test/ruby/test_numeric.rb: ditto.

* test/ruby/test_fixnum.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-10 21:52:25 +00:00
nobu c12b289362 * {bcc32,win32,wince}/Makefile.sub (MISSING): added cbrt.obj.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-10 06:07:31 +00:00
nobu 8bc75b5bb0 * lib/irb.rb (IRB::Irb::eval_input): rescues Interrupt and other than
SystemExit and SignalException.  [ruby-core:15359]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-08 15:44:54 +00:00
mame 2bef7dece1 * test/ruby/test_hash.rb: follow the change of Hash#flatten.
* test/ruby/test_time.rb: add tests to achieve over 70% test coverage
  of time.c.

* test/ruby/test_prec.rb: ditto over 90% for prec.c.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 15:09:12 +00:00
matz 5a8d5c873b * ext/nkf/nkf-utf8/nkf.c (nkf_enc_from_index): BINARY does not
have in-bound encoding index.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 00:06:55 +00:00
mame a73ec67e8d * hash.c (env_rassoc): remove access to free'd environment on mswin32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-05 15:25:35 +00:00
nobu f0cc22e990 * lib/mkmf.rb (INSTALL_DIRS, install_dirs): added BINDIR.
* lib/mkmf.rb (install_files): rejects files matching to
  $NONINSTALLFILES.

* lib/mkmf.rb (init_mkmf): defaults $NONINSTALLFILES to backup and
  temporary filse.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-05 02:14:17 +00:00
matz 50f6e01b44 * lib/cgi.rb (CGI::QueryExtension::[]): no more transition
extend(CGI::Value).  a patch from <tommy AT tmtm.org> in
  [ruby-dev:33583].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-04 00:02:53 +00:00
nobu 3940857f2b * configure.in (darwin): disabled fat-binary support which confuses
configure much, since ``universal'' implies hidden cross-compiling.
  TODO: ruby and libruby.bundle might be possible to bound with `lipo'
  after builds for each archs.  Anyway, config.h and rbconfig.rb must
  be separated definitely at least.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-02 00:53:41 +00:00
usa 12f3bcfcab * 2008-02-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-01 02:48:33 +00:00
usa a1c42c017a * 2008-01-31
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-30 15:40:49 +00:00
usa 5a674ddca6 * 2008-01-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-29 15:19:31 +00:00
nobu f7ed47355e * misc/ruby-mode.el (ruby-mode-set-encoding): updates magic comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28 15:10:02 +00:00
nobu 7c69f166bd * parse.y (parser_set_encode): check if encoding is ASCII compatible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 15:39:14 +00:00
usa 665e571839 * 2008-01-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 15:34:25 +00:00
nobu 5f010f7299 * */*.bat: set svn:mime-type to text/batch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 01:32:00 +00:00
usa 3ef86ffdfe * 2008-01-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-23 15:46:17 +00:00
matz 105a669631 * eval_method.c (rb_export_method): set ruby_vm_redefined_flag for
visibility change as well.  reported by K.Kosako in
  http://d.hatena.ne.jp/kkos/20080122#1201012720.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-23 01:20:51 +00:00
mame b3ee6f9718 * test/ruby/test_bignum.rb: add tests for bignum.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-21 15:46:48 +00:00
nobu ea64014c56 * string.c (rb_str_each_char): advance offset before get next char
length.  [ruby-dev:33211]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-20 18:45:51 +00:00
usa caa539f2a3 * thread_win32.c (w32_wait_events): shouldn't invoke interrupt handle
by timer_thread.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-18 15:15:40 +00:00
nobu fe3987ae96 * ext/stringio/stringio.c (strio_init): use default external encoding
if nothing is given.  a patch from sheepman <sheepman AT
  sheepman.sakura.ne.jp> in [ruby-dev:33159].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-17 15:03:56 +00:00
nobu ce2652c9d4 * include/ruby/intern.h (rb_str_tmp_new, rb_str_shared_replace):
prototype moved.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-16 03:51:32 +00:00
matz fa246559d2 * io.c (appendline): specifying limit should not generate broken
byte sequence.  strings should be rounded.  [ruby-dev:33088]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-14 15:07:49 +00:00
matz c884219d96 * ruby.1: a patch to describe --encoding. a patch from Yugui
<yugui AT yugui.sakura.ne.jp> in [ruby-dev:33079].

* ruby.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-14 07:10:22 +00:00
matz e699dda504 * enc/make_encdb.rb: should work on Ruby 1.8. [ruby-dev:33069]
* common.mk (encdb.h): pass enc dir from outside to make_encdb.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-12 16:55:33 +00:00
usa 603f9304b2 * 2008-01-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-11 22:28:37 +00:00
matz d17bcfc802 * thread.c (rb_mutex_unlock): proper error message for unlocking
mutex that is not locked.  a patch from Yusuke ENDOH
  <mame at tsg.ne.jp> in [ruby-dev:33010].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-10 16:12:32 +00:00
matz 81064a7688 * io.c (rb_io_binmode): should not alter encoding. [ruby-dev:32918]
* io.c (io_read_encoding): need not to return ASCII-8BIT for
  binary IO.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 17:44:13 +00:00
matz 251dec5cf1 * string.c (rb_enc_cr_str_buf_cat): do not recalculate coderange
value if it's given from outside.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 04:07:11 +00:00
usa 6a1a57d13b * 2008-01-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 00:06:38 +00:00
usa ee6abe3252 * 2008-01-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-07 00:16:09 +00:00
usa 84a92191e3 * 2008-01-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06 01:57:17 +00:00
nobu 8638ee26e7 * include/ruby/intern.h, re.c (rb_reg_new): keep interface same as
1.8.  [ruby-core:14583]

* include/ruby/intern.h, re.c (rb_reg_new_str): renamed, and defines
  HAVE_RB_REG_NEW_STR macro to tell if it is available.

* include/ruby/encoding.h (rb_enc_reg_new): added.

* insns.def (toregexp), marshal.c (r_object0): use rb_reg_new_str().

* re.c (rb_reg_regcomp, rb_reg_s_union): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-04 16:30:33 +00:00
matz 52ed8c4edd * include/ruby/oniguruma.h: Oniguruma 1.9.1 merged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-03 15:55:04 +00:00
usa 499bc93a42 * 2007-01-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-03 01:47:18 +00:00
usa 8676df80ed * 2008-01-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-02 01:58:33 +00:00
nobu d64a975396 * ruby.c (process_options): rejects dummy encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-31 16:04:11 +00:00
usa f7b12afff5 * test/net/imap/test_imap.rb: check OpenSSL definition before testing imaps.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-30 20:58:31 +00:00
usa 7c8e5e2f65 * 2007-12-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-29 18:50:49 +00:00
usa 57bb055c93 * io.c (io_unread): adhoc workaround for non-binary mode of some DOSish
platforms. this is not perfect and safety, but works with most cases.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28 17:20:24 +00:00
usa 3bcd7c418b * common.mk (golf_prelude.c): use MINIRUBY instead of BASERUBY because
tool/compile_prelude.rb requires rbconfig.rb.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-27 15:03:14 +00:00
usa fc9a7983cf * lib/mkmf.rb (create_tmpsrc): retry to create file if Errno::EACCES
occurs. this is a workaround for mswin32.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-26 17:32:22 +00:00
nobu db5a25f3f3 * ext/json/ext/generator/generator.c (Init_generator): requires
json/common.rb for GeneratorError, when static linked.  a patch from
  Kenta Murata <muraken AT gmail.com> in [ruby-dev:32789].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25 15:57:55 +00:00
matz a04a812ed0 * include/ruby/encoding.h (rb_enc_left_char_head): new utility macro.
* include/ruby/encoding.h (rb_enc_right_char_head): ditto.

* io.c (appendline): does multibyte RS search in the function.

* io.c (prepare_getline_args): RS may be nil.

* io.c (rb_io_getc): should process character based on external
  encoding, when transcoding required.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24 16:36:14 +00:00
matz 2e791ace7f * io.c (rb_io_s_read): encoding argument reverted.
* io.c (mode_enc): independent function to share code.

* io.c (rb_io_internal_encoding): new method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23 15:56:41 +00:00
nobu 872899fa58 * version.h: use patchlevel if revision is not set.
* {bcc32,win{32,ce}}/setup.mak (-version-): skip including revision.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22 18:26:50 +00:00