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

26646 Коммитов

Автор SHA1 Сообщение Дата
naruse bad859ca3e * regparse.c (PFETCH_READY): suppress Wunused-but-set-variable.
* regparse.c (is_onechar_cclass): restructured to clarify that c is
  used iff found == 1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 20:46:11 +00:00
naruse 114ae69b45 * configure.in: use -fbuiltin with -ansi -std=iso9899:199409.
This prevents errors introduced by disabling bulitin functions,
  which is the sub-effect of -ansi/-std.
  Now NetBSD can use -ansi -std=iso9899:199409.
  Maybe mingw, cygwin and darwin can also.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 19:57:31 +00:00
naruse 06d483006c * Makefile.in: don't remove macros. now name2ctype uses macros.
* tool/enc-unicode.rb: add comment why it uses Hash#index.

* enc/unicode/{name2ctype.kwd,name2ctype.src,name2ctype.h.blt}:
  update to follow the current name2ctype.h.
  FYI current Unicode version is 6.1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 17:54:14 +00:00
svn de08418fc6 * 2012-06-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 15:20:32 +00:00
knu 3703619ed9 * lib/net/http/responses.rb, lib/webrick/httpstatus.rb: Add HTTP
response codes added in RFCs 2817 and 4918.  [ruby-core:45547]
  [Feature #6569]

* lib/net/http/responses.rb: Rename Net::HTTPMultipleChoice to
  Net::HTTPMultipleChoices, leaving the former as alias to the
  latter for backward compatibitily.  [ruby-core:45547]
  [Feature #6569]

* lib/net/http/responses.rb: Add comments about unused,
  still-in-draft and private extension response codes.
  [ruby-core:45547] [Feature #6569]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 15:20:27 +00:00
akr a29bdaf63f add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 14:00:33 +00:00
ngoto bff44ef4cd * test/dl/test_func.rb (test_qsort1, test_qsort2): use TYPE_SIZE_T
for size_t variables. [ruby-dev:45733] [Bug #6584]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 13:52:04 +00:00
nobu a9ff01cdae configure.in: option for darwin
* configure.in: remove -ansi and -std options for lgamma_r() and
  finite().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 13:18:05 +00:00
nobu 0d86842f61 configure.in: option for cygwin
* configure.in: cygwin does not provide some declarations in strict
  ANSI mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 12:46:38 +00:00
nobu e985a6841c configure.in: option for cygwin
* configure.in: cygwin does not provide some declarations in strict
  ANSI mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 12:46:36 +00:00
akr d793a86b43 update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 11:37:33 +00:00
akr e9a1ba232a * process.c (rb_fork_internal): move a variable declaration.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 11:20:33 +00:00
shyouhei 2c1322ec88 * regparse.c (PFETCH_READY): this line was to suppress warning,
but  did emit  warnings if  -Wuninitialized was  set.  Assigning
	  NULL instead if pfetch_prev should suffice the situation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 08:58:05 +00:00
nobu 23838b93e8 configure.in: option for cygwin
* configure.in: cygwin needs C99 for some stuff, e.g.,
  pthread_attr_setstacksize, sched_yield.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 08:51:04 +00:00
nobu 0c7dab5df9 Makefile.in: warnflags
* Makefile.in (.c.i): add warnflags to make the result consistent with
  compilation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 08:50:42 +00:00
nobu 9c48976392 process.c: suppress warning
* process.c (compare_posix_sh): not used on Win32.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 07:38:06 +00:00
shyouhei 43bc8f9beb * configure.in: On Windows platforms, system provided headers are
VC++ optimized.  That is, C++ habits are often contaminated into
	  various  headers.  Most  frequent  situation is  the  use of  //
	  comments.  We bypass ANSI  C mode for them.  Otherwise extension
	  libs cannot include those headers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 06:16:46 +00:00
nobu 24b9cf95e0 include/ruby/win32.h: fix comment style
* include/ruby/win32.h: get rid of C99 style one line comments.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 04:39:25 +00:00
nobu da5ac6f565 encoding.c: strdup macro
* encoding.c (enc_alias_internal): use strdup defined as macro.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 04:39:06 +00:00
nobu 6379978d45 configure.in: check iff nacl
* configure.in (RUBY_NACL_CHECK_PEPPER_TYPES): check only on nacl.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 04:09:37 +00:00
nobu 9341988b41 thread_pthread.c: suppress warning
* thread_pthread.c (get_stack): define guard only when it is used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 04:09:35 +00:00
nobu 621153bf3f process.c: no SIZE_T_MAX
* process.c (rb_exec_fillarg): get rid of SIZE_T_MAX which may need
  more headers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 01:20:29 +00:00
nobu 33b15cef6c process.c: fix array element size
* process.c (rb_exec_fillarg): fix array element size.  "continue" and
  "readonly" exceeded the size.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 01:20:05 +00:00
nobu 2d460925f2 process.c: use shell for reserved or special built-in
* process.c (rb_exec_fillarg): use shell if the first word is reserved
  or special built-in name.
  http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 00:56:31 +00:00
nobu e6a6561121 process.c: treat '=' only in the first word
* process.c (rb_exec_fillarg): treat '=' only in the first word.  if
  the first word does not contain '=', it is the command name and
  environment assignments cannot be anymore.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 00:55:31 +00:00
svn fe5a15251f * 2012-06-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 00:54:36 +00:00
nobu 18c32c9451 process.c: constified
* process.c (rb_exec_fillarg): constified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 00:54:32 +00:00
naruse 720dc30458 * lib/mkmf.rb: add dummy clean-static target to prevent errors for the
case real clean-static target doesn't exist.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-12 14:46:29 +00:00
ngoto 3f4b0e17f4 * process.c (rb_exec_arg_fixup): fix compile error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-12 13:55:42 +00:00
akr f00d5d99f0 fix a typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-12 12:50:47 +00:00
akr 94b275c5b3 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-12 12:44:26 +00:00
akr 640e0a33b7 * process.c (rb_exec_fillarg): treat '=' character as an meta
character to detect assignments preceding command name.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-12 12:41:08 +00:00
shyouhei 0dcc1f0dfe fix typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-12 12:09:16 +00:00
akr 37a1355bf8 * include/ruby/intern.h (rb_exec_arg_init): deprecated.
(rb_exec_arg_addopt): ditto.
  (rb_exec_arg_fixup): ditto.
  (rb_run_exec_options): ditto.
  (rb_run_exec_options_err): ditto.

* internal.h (rb_execarg_init): declared.
  (rb_execarg_addopt): ditto.
  (rb_execarg_fixup): ditto.
  (rb_execarg_run_options): ditto.

* process.c: call rb_execarg_addopt, rb_execarg_fixup,
  rb_execarg_run_options, rb_execarg_init.
  (rb_execarg_addopt): renamed from rb_exec_arg_addopt.
  (rb_exec_arg_addopt): stub to call rb_execarg_addopt.
  (rb_execarg_init): renamed from rb_exec_arg_init.
  (rb_exec_arg_init): stub to call rb_execarg_init.
  (rb_execarg_fixup): renamed from rb_exec_arg_fixup.
  (rb_exec_arg_fixup): stub to call rb_execarg_fixup.
  (rb_execarg_run_options): renamed from rb_run_exec_options_err.
  (rb_run_exec_options_err): stub to call rb_execarg_run_options.
  (rb_run_exec_options): call rb_execarg_run_options.

* io.c: call rb_execarg_addopt, rb_execarg_fixup,
  rb_execarg_run_options, rb_execarg_init.

* ext/pty/pty.c (establishShell): call rb_execarg_init and
  rb_execarg_fixup.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-12 11:34:51 +00:00
shyouhei 0284e64922 * configure.in: enable strict ANSI mode by default in case of GCC,
requested by _ko1.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-12 09:41:07 +00:00
svn aa56c127b5 * 2012-06-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-11 21:40:57 +00:00
akr 45e5f2f690 * process.c (rb_exec_fillarg): detect '#' as a meta character.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-11 21:40:50 +00:00
akr a903db9c23 * include/ruby/intern.h (rb_proc_exec_n): deprecated.
(rb_exec): ditto.
  (rb_exec_err): ditto.
  (rb_fork): ditto.
  (rb_fork_err): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-11 13:16:36 +00:00
akr 05a98ce736 update tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-11 12:58:55 +00:00
akr ffe89b7621 add comment about meta characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-11 12:37:55 +00:00
naruse f658207fe3 * configure.in: on checking libexecinfo, don't specify /use/local.
On FreeBSD people must specify --with-opt-dir or --with-execinfo-dir.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-11 11:27:08 +00:00
ko1 0a71db8a74 * vm_core.h: remove lfp (local frame pointer) and rename
dfp (dynamic frame pointer) to ep (environment pointer).
  This change make VM `normal' (similar to other interpreters).
  Before this commit:
  Each frame has two env pointers lfp and dfp.  lfp points
  local environment which is method/class/toplevel frame.
  lfp[0] is block pointer.
  dfp is block local frame. dfp[0] points previous (parent)
  environment pointer.
  lfp == dfp when frame is method/class/toplevel.
  You can get lfp from dfp by traversing previous environment
  pointers.
  After this commit:
  Each frame has only `ep' to point respective enviornoment.
  If there is parent environment, then ep[0] points parent
  envioenment (as dfp).  If there are no more environment,
  then ep[0] points block pointer (as lfp).  We call such ep
  as `LEP' (local EP).  We add some macros to get LEP and to
  detect LEP or not.
  In short, we replace dfp and lfp with ep and LEP.
  rb_block_t and rb_binding_t member `lfp' and `dfp' are removed
  and member `ep' is added.
  rename rb_thread_t's member `local_lfp' and `local_svar' to
  `root_lep' and `root_svar'.
  (VM_EP_PREV_EP(ep)): get previous environment pointer.  This macro
  assume that ep is not LEP.
  (VM_EP_BLOCK_PTR(ep)): get block pointer.  This macro assume
  that ep is LEP.
  (VM_EP_LEP_P(ep)): detect ep is LEP or not.
  (VM_ENVVAL_BLOCK_PTR(ptr)): make block pointer.
  (VM_ENVVAL_BLOCK_PTR_P(v)): detect v is block pointer.
  (VM_ENVVAL_PREV_EP_PTR(ptr)): make prev environment pointer.
  (VM_ENVVAL_PREV_EP_PTR_P(v)): detect v is prev env pointer.
* vm.c: apply above changes.
  (VM_EP_LEP(ep)): get LEP.
  (VM_CF_LEP(cfp)): get LEP of cfp->ep.
  (VM_CF_PREV_EP(cfp)): utility function VM_EP_PREV_EP(cfp->ep).
  (VM_CF_BLOCK_PTR(cfp)): utility function VM_EP_BLOCK_PTR(cfp->ep).
* vm.c, vm_eval.c, vm_insnhelper.c, vm_insnhelper.h, insns.def:
  apply above changes.
* cont.c: ditto.
* eval.c, eval_intern.h: ditto.
* proc.c: ditto.
* thread.c: ditto.
* vm_dump.c: ditto.
* vm_exec.h: fix function name (on vm debug mode).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-11 03:14:59 +00:00
shyouhei 9b29e5f7e1 * compile.c (iseq_set_sequence): nonstatic initializer of an
aggregate type is a C99ism.

	* compile.c (enum compile_array_type_t): comma at the end of enum
	  list is a C99ism.

	* vm_backtrace.c (enum LOCATION_TYPE): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-11 02:57:02 +00:00
akr 9ea35ccf30 * process.c (rb_proc_exec_n): revert the function removed at r35889.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 21:31:49 +00:00
naruse 35973f273c * thread_pthread.c (rb_thread_create_timer_thread): assign return
value to the variable err.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 21:21:51 +00:00
naruse 67b8c950bf * thread_pthread.c (native_cond_initialize): fix typo in r36022.
this cause a failure on FreeBSD 8.2 amd64.
  http://fbsd.rubyci.org/~chkbuild/ruby-trunk/log/20120610T130201Z.diff.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 21:19:07 +00:00
svn cf8c5c1405 * 2012-06-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 20:24:47 +00:00
ko1 574024147b * .gdbinit (SDR): add SDR function. It's only for VM debugging.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 20:24:43 +00:00
yugui cc4072b3db * nacl/nacl_config.rb: Fixed for 32bit hosts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 12:51:40 +00:00
yugui c3f3d77225 Fixes threading on NativeClient.
* thread_pthread.c (timer_thread_sleep): Extracted out a function from
  thread_timer(). Added an alternative implementation for platforms
  that lacks select(2) or pipe(2).
  (rb_thread_create_timer_thread, native_cond_initialize,
  native_cond_destroy): Replaced wrong HAVE_XXX checks.

* configure.in (pthread_attr_init): New check.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 12:51:37 +00:00