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

2030 Коммитов

Автор SHA1 Сообщение Дата
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