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

27150 Коммитов

Автор SHA1 Сообщение Дата
ko1 e2f5d4f9c7 * bootstrap/test_exception.rb: fix a last committed test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-08 08:11:12 +00:00
ko1 93b6f8d619 * compile.c, insns.def (checkmatch):
remove checkincludearray instruction and
  add new instruction checkmatch.
  This change is to solve
  [Bug #4438] "rescue args type check omitted".
* iseq.c: increment ISEQ_MAJOR_VERSION because removal of
  checkincludearray instruction.
* vm_core.h: add several definitions for
  the checkmatch instruction.
* vm_insnhelper.c (check_match): added.
* bootstraptest/test_exception.rb: add a test.
* test/ruby/test_exception.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-08 07:52:19 +00:00
svn 8637eac406 * 2012-08-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-07 20:51:51 +00:00
drbrain 292a319608 * proc.c (method_clone): Added documentation. Patch by Robin Dupret.
Fixes #152 on github.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-07 20:51:48 +00:00
naruse a996b48515 * ext/readline/readline.c (Init_readline): rl_catch_signals=0 returns
back. Without this, on FreeBSD9 and readline 6.2 irb can't catch ^C.
  [Bug #5423]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-07 11:22:04 +00:00
ko1 0d1a905edb * vm_exec.c, insns.def (leave): solve problems on
OPT_CALL_THREADED_CODE.
  Catch up finish frame structure on OPT_CALL_THREADED_CODE.
* vm_core.h: add rb_thread_t#retval for temporary space on
  OPT_CALL_THREADED_CODE.
* vm.c (th_init): clear rb_thread_t#retval as Qundef.
* vm_dump.c (rb_vmdebug_debug_print_pre): fix debug print format.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-07 11:13:57 +00:00
usa fca3c408a7 * test/ruby/test_require.rb (TestRequire#test_require_twice): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-07 02:59:04 +00:00
shugo 0f24f94470 * vm_method.c (rb_redefine_opt_method): use RCLASS_ORIGIN to avoid
SEGV when a module-prepended class is refined.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-07 02:44:24 +00:00
usa b361d7d082 * test/ruby/test_file_exhaustive.rb
(TestFileExhaustive#test_expand_path*): refactoring.  split the method
  into some chunks of the same kind of tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-07 01:48:36 +00:00
tenderlove ac37fc37b1 test String#each_line when separator is longer than string.
Thanks Charles Nutter.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-07 00:43:44 +00:00
nobu 28827e61d1 method in instance_eval
* class.c (rb_special_singleton_class_of): utility function.
* vm_eval.c (eval_under): special deal for class variable scope with
  instance_eval.
* vm_eval.c (rb_obj_instance_eval, rb_obj_instance_exec): allow method
  definition in instance_eval of special constants.  [ruby-core:28324]
  [Bug #2788]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 15:31:13 +00:00
svn 353833c466 * 2012-08-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 15:24:09 +00:00
nobu 6f677a5e00 variable.c: split CVAR_LOOKUP
* variable.c (CVAR_LOOKUP): split into helper functions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 15:24:01 +00:00
nobu 745de093db test_exception.rb: split tests
* test/ruby/test_exception.rb (test_exception, test_else): split huge
  tests into simple tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 13:06:37 +00:00
nobu ddabdd4427 test_exception.rb: use local variables
* test/ruby/test_exception.rb (test_exception, test_else): use local
  variables instead unnecessary global variables.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 13:06:16 +00:00
nobu 281e4b611f vm_eval.c: check exceptional condition first
* vm_eval.c (vm_call_super): check exceptional condition first.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 12:18:10 +00:00
suke 906b2110d9 * test/win32ole/test_win32ole_variant.rb: setting WIN32OLE.locale
to pass some assertion.  Thanks to Hiroshi Shirosaki.
  [ruby-core:46873][Bug #6814]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 10:21:12 +00:00
shugo 9537e8ffe5 * internal.h, class.c, eval.c, insns.def: find the appropriate
receiver for super called in instance_eval.  If such a receiver is
  not found, raise NoMethodError. [ruby-dev:39772] [Bug #2402]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 07:00:19 +00:00
shugo 3dd941b234 * include/ruby/ruby.h, eval.c, vm_insnhelper.c: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 05:55:19 +00:00
nobu d93d45fea7 vm_eval.c: remove dead code
* vm_eval.c (vm_call_super): since cfp->klass is always class or
  iclass, no search from method entry.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 04:14:00 +00:00
nobu cc48423ead insns.def: use klass in cfp
* insns.def (defined): now should use klass in the current control
  frame to search superclass, not me->klass.  reported by naruse.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 02:34:36 +00:00
usa 7c5336b8f9 * test/etc/test_etc.rb (TestEtc#test_getpwuid): `s' is never set to nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 02:20:47 +00:00
usa e7c6f87c89 * syslog/test_syslog_logger.rb: miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 02:11:58 +00:00
usa 404bb0efce * test/syslog/test_syslog_logger.rb: skip unless Syslog module is
available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-06 02:09:33 +00:00
nobu 13527efd59 bigdecimal.c: fix format specifier
* ext/bigdecimal/bigdecimal.c (BigMath_s_log): fix format specifier.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-05 15:40:56 +00:00
nobu d97cd39f42 io.c: suppress unused variable warnings
* io.c (pipe_open): suppress warnings agains variable which are used
  when spawnv is available but fork is not.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-05 15:40:06 +00:00
nobu 95512f2777 ruby.h: rb_num2ulong_inline
* include/ruby/ruby.h (NUM2ULONG): optimize by inline as well as
  NUM2LONG, and cast to unsigned long explicitly for the platforms
  where SIZEOF_VALUE is larger than SIZEOF_LONG.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-05 15:39:26 +00:00
svn 306a16d201 * 2012-08-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-05 15:39:00 +00:00
nobu 09288de5df ruby.h: fix cast
* include/ruby/ruby.h (NUM2SSIZET): fix type to cast.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-05 15:38:55 +00:00
nari cf4aa712e4 add references
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-05 12:17:33 +00:00
nari 8f1c81c610 * gc.c : if ENABLE_VM_OBJSPACE is 1, rest_sweep is not defined.
remove unused declarations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-05 12:12:45 +00:00
nari dd124a0f84 * gc.c: just move functions and so on. I don't touch any internal
implementation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-05 10:39:37 +00:00
nobu 800d9a7ac1 test_etc.rb: remove implicit assumption
* test/etc/test_etc.rb (TestEtc#test_getpwuid): remove implicit
  assumption, that getpwuid() would return the first entry in the
  order of getpw(), for shared UID.  apparently it is not true on
  MacOS X 10.8.  [ruby-core:46975][Bug #6831]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-05 05:14:35 +00:00
naruse e57da6109c * configure.in: use gcc-4.2 prior to clang, gcc, and cc if exist for
the use of Snow Leopard's old clang. see also r36594, r36610, r36611.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-05 04:26:24 +00:00
tadf 949d740a32 uncommented some tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-04 22:07:42 +00:00
tadf a2c5d15572 added a comment
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-04 22:04:20 +00:00
svn 7f13c5e42e * 2012-08-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-04 21:59:38 +00:00
tadf ab67ba64ca * ext/date/date_{core,strftime}.c: [ruby-core:46990].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-04 21:57:48 +00:00
nari de0c788bb4 * gc.c: use inline functions instead of macros, and close up
related codes for the profiler.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-04 14:12:12 +00:00
nari d7a3331682 * gc.c (gc_mark_children): use gc_mark_ptr instead of marking
a object directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-04 11:40:59 +00:00
shugo cd060b4588 * test/ruby/test_alias.rb (test_super_in_aliased_module_method):
add a test case for [ruby-dev:46028], which fails in 1.8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-04 01:04:05 +00:00
nobu 260d02d91d vm_insnhelper.c: no recv
* vm_insnhelper.c (vm_search_normal_superclass): no longer needs
  receiver, klass is always unique in the ancestors now.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-03 16:56:08 +00:00
nobu e421410edc test_super.rb: rename
* test/ruby/test_super.rb (TestSuper#test_double_include2): rename to
  get rid of redefinition.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-03 16:54:19 +00:00
svn 2e2245bf18 * 2012-08-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-03 16:32:59 +00:00
shugo 9bef3f0519 * insns.def (invokesuper): reverted r36612 so that super in an
aliased method will not call the same method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-03 16:32:52 +00:00
shugo 2d3d84155d * insns.def (invokesuper): don't skip the same class. instead, use
rb_method_entry_get_with_omod() to avoid infinite loop when
  super is used with refinements. [ruby-core:30450] [Bug #3351]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-03 10:27:21 +00:00
nobu bea3f0df10 configure.in: use default compilers for non-darwin
* configure.in: use clang prior to gcc only when self-compiling on
  darwin.  search default compilers on other platforms.  [Bug #6816]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-03 10:21:22 +00:00
naruse a713b37640 * configure.in: move RUBY_MINGW32 after AC_PROG_CC.
RUBY_MINGW32 uses AC_TRY_CPP and it sets CC and CPP. [Bug #6816]

* configure.in: don't use AC_PROG_CC in AS_CASE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-03 08:27:04 +00:00
nobu 7ed6c4eec8 un.rb: reduce duplication
* lib/un.rb (httpd): reduce duplicated code.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-03 08:23:18 +00:00
nobu a580c01dc0 un.rb: DocumentRoot
* lib/un.rb (httpd): document root is mandatory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-03 08:22:45 +00:00