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

721 Коммитов

Автор SHA1 Сообщение Дата
nobu 24e1be7411 * include/ruby/ruby.h (RB_GC_GUARD_PTR): get rid of removal by
optimization.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-09 14:53:16 +00:00
nobu 6060c3a4b6 * include/ruby/win32.h (rb_w32_uchdir): missing prototype.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04 04:26:43 +00:00
usa 6c28f99d88 * merge some patches from win32-uncode-test branch.
see #1685.

* file.c, include/ruby/intern.h (rb_str_encode_ospath): new function
  to convert encoding for pathname.

* win32.c, include/ruby/win32.h (rb_w32_ulink, rb_w32_urename,
  rb_w32_ustati64, rb_w32_uopen, rb_w32_uutime, rb_w32_uchdir,
  rb_w32_umkdir, rb_w32_urmdir, rb_w32_uunlink): new functions to
  accept UTF-8 path.

* win32/win32.c (rb_w32_opendir, link, rb_w32_stati64, rb_w32_utime,
  rb_w32_unlink): use WCHAR path internally.

* file.c (rb_stat, eaccess, access_internal, rb_file_s_ftype,
  chmod_internal, rb_file_chmod, rb_file_chown, utime_internal,
  rb_file_s_link, unlink_internal, rb_file_s_rename): use UTF-8 version
  functions on Win32.

* file.c (apply2files, rb_stat, rb_file_s_lstat, rb_file_symlink_p,
  rb_file_readable_p, rb_file_writable_p, rb_file_executable_p,
  check3rdbyte, rb_file_identical_p, rb_file_chmod, rb_file_chown,
  rb_file_s_link, rb_file_s_symlink, rb_file_s_rename): call
  rb_str_encode_ospath() before passing the path to system.

* io.c (rb_sysopen): ditto.

* dir.c (dir_chdir, dir_s_mkdir, dir_s_rmdir): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30 17:56:23 +00:00
nobu 790d6071c6 * include/ruby/ruby.h ({RSTRING,RSTRUCT,RBIGNUM}_LENINT): check long
to cast to int.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-28 07:45:00 +00:00
nobu 021e7b7f20 * include/ruby/win32.h (ftruncate): rename to get rid of conflict
with same name but non-LFS function on MinGW.  [ruby-core:24757]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-11 02:58:26 +00:00
usa 3b86c8c4ae * include/ruby/win32.h: include errno.h before defining errnos.
see [ruby-core:29314]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-08 05:25:10 +00:00
usa 727371f88a * include/ruby/win32.h: check definition existance before defining
errno macros.

* win32/win32.c (errmap): define winsock errors mappings.
  these are VC++10 support. see [ruby-core:29278]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-06 05:58:07 +00:00
usa 54da3ecbcb * include/ruby/win32.h, win32/win32.c (EWOULDBLOCK): VC10 already
defined EWOULDBLOCK.  based on a patch from Charlie Savage,
  see [ruby-core:29255]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-05 04:26:33 +00:00
naruse b919cb1d93 * include/ruby/ruby.h: replace snprintf and vsnprintf by
ruby_snprintf and ruby_vsnprintf. [ruby-dev:40909]

* configure.in: don't check snprintf(3) and vsnprintf(3).

* include/ruby/missing.h: don't delare snprintf and vsnprintf.

* include/ruby/ruby.h: include stdarg.h.

* sprintf.c: include vsnprintf.c

* vsnprintf.c: renamed from missing/vsnprintf.c.

* vsnprintf.c: remove useless ifdefs.

* win32/mkexports.rb: use ruby_snprintf and ruby_vsnprintf.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-04 01:10:53 +00:00
nobu 2f20718249 * include/ruby/ruby.h (InitVM): calls per-VM initialization in
single VM, but does nothing in MVM.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-01 20:38:38 +00:00
usa c530b9d60a * include/ruby/ruby.h (PRE_TIMET_PREFIX): define if configure doesn't
defines it.  [ruby-core:29190]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-01 03:06:07 +00:00
nobu 44e08324c7 * include/ruby/ruby.h (RUBY_{DEFAULT,NEVER}_FREE): added.
[ruby-dev:40889]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-01 00:54:37 +00:00
nobu 38af94c6ab * file.c (rb_file_dirname): split from rb_file_s_dirname.
* load.c (rb_f_require_relative): use absolute path instead of
  expanded path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-30 09:26:09 +00:00
nobu c9e0df64b5 * ruby.h (rb_warning, rb_sys_warning): fixed typo in rdoc.
[ruby-core:28696]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-16 21:40:05 +00:00
nobu 43025927c6 * include/ruby/encoding.h (rb_str_conv_enc_opts): missing prototype.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-16 08:18:47 +00:00
nobu bf45c36d5f * include/ruby/encoding.h (ENC_TO_ENCINDEX): suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-16 05:06:19 +00:00
nobu b1bf026f48 * include/ruby/io.h (MakeOpenFile): finalize fptr get rid of
memory leak.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-13 03:26:18 +00:00
shugo d9fe7ef492 * load.c (rb_get_expanded_load_path): does not expand paths if all
the items in $: are absolute paths.  [ruby-core:28113]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-13 01:34:38 +00:00
nobu 1dcf1174ea * ruby.c (ruby_init_loadpath_safe, ruby_init_gems): set and remove
TMP_RUBY_PREFIX.

* variable.c (rb_mod_remove_const): new function.

* tool/compile_prelude.rb: split each preludes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-11 22:15:11 +00:00
matz db37773e13 * include/ruby/oniguruma.h: updated to follow Oniguruma 5.9.2.
* re.c (make_regexp): use onig_new() instead of onig_alloc_init().

* re.c (rb_reg_to_s): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-01 21:54:59 +00:00
muraken 5073155a17 * math.c (rb_eMathDomainError): new exception class for representing mathematical domain error instead of Errno::EDOM.
* math.c (domain_check, infinity_check): removed, no longer needed.
* math.c (math_atan2, math_acos, math_asin, math_acosh, math_atanh, math_log, math_log2, math_log10, math_sqrt, math_gamma, math_lgamma): mathematical domain errors are checked and raised before calling libm's functions.
* test/ruby/test_math.rb: updated for changes of maht.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-28 10:08:22 +00:00
akr 8c9024763f * pack.c: fix q and Q for big endian environments which have no
8 bytes integer type.
  (pack_pack): use rb_big_pack.
  (pack_unpack): use rb_big_unpack.

* include/ruby/intern.h (rb_big_pack): declared.
  (rb_big_unpack): ditto.

* bignum.c (rb_big_pack): new function.
  (rb_big_unpack): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-26 18:51:02 +00:00
nobu 27e492bec7 * marshal.c (r_object0): register regexp object before encoding
name.  [ruby-dev:40414]

* re.c (rb_reg_alloc, rb_reg_init_str): split from rb_reg_new_str.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-13 19:45:35 +00:00
nobu ccf67667b8 * version.c (RUBY_LIB, RUBY_*_LIB): moved from configures.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25 08:36:14 +00:00
nobu 695c32a028 * include/ruby.h: removed duplication, added the macro for version.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25 05:02:26 +00:00
nobu 23a4f81625 * configure.in: check for if struct timezone is defined.
* missing.h (struct timezone): define if not defined.

* win32/win32.h (struct timezone): defined in the newer w32api.
  [ruby-core:27515]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 21:54:47 +00:00
akr 853dd6cabe * prelude.rb (require_relative): use File.realpath. [ruby-dev:40040]
* include/ruby/intern.h: declare rb_dir_getwd.

* dir.c (rb_dir_getwd): copied from dir_s_getwd to export.
  (dir_s_getwd): use rb_dir_getwd.

* file.c (rb_file_s_realpath): new method File.realpath.
  (rb_file_s_realdirpath): new method File.realdirpath.

* lib/pathname.rb (Pathname#realpath): use File.realpath.
  (Pathname#realdirpath): use File.realdirpath.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12 00:32:22 +00:00
naruse a3973ab1ba * string.c (rb_str_strlen): added. [ruby-dev:40028]
* include/ruby/intern.h (rb_str_strlen): declared.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-11 07:58:26 +00:00
yugui 295bc2fe25 removes the dtrace support. reverts r26239, r26238 and r26235.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-05 05:59:23 +00:00
yugui 72b199940d * trace.h: new file. wraps tracing mechanisms.
* defs/dtrace.d: new file. defined a dtrace provider "ruby".

* include/ruby/ruby.h (LIKELY): moved from vm.c.
  (UNLIKELY): ditto.
  (OBJSETUP): probe "object-create".
  (RUBY_EVENT_RESCUE): new event.

* vm_exec.c (DEBUG_ENTER_INSN): embeded a probe insn-entry into it.
  (DEBUG_END_INSN): insn-return.

* vm.c (LIKELY): moved into ruby.h.
  (UNLIKELY): ditto.
  (Init_BareVM): embeded a probe "raise" into it.

* variable.c (rb_class2name_without_alloc): new utility function.

* tool/rbinstall.rb (install?(:ext, :arch, :'ext-arch')): installs 
  dtrace.d if necessary.

* thread_pthread.c (add_signal_thread_list): probe "raise".
  (rb_thread_create_timer_thread): ditto.

* thread.c (rb_thread_schedule_rec): probes "thread-enter" and
  "thread-leave",
  (thread_start_func_2): ditto.
  (thread_cleanup_func): probe "thread-term"

* lib/mkmf.rb: supports dtrace postprocessor on making an extension.

* iseq.c (rb_vm_insn_name): new utility function.
  (rb_vm_insn_len): ditto.

* insns.def (hook): probes "method-etnry", "method-return", "line",
  and "rescue".

* compile.c (iseq_compile_each): adds a trace op for "rescue" probe.

* gc.c (garbage_collect): probes "gc-begin" and "gc-end".
  (obj_free): probe "object-free"
  (garbage_collect_with_gvl): probe "raise"
  (negative_size_allocation_error): ditto.
  (rb_memerror): ditto.

* eval.c (rb_rescue2): probe "rescue"
  (rb_longjmp): probe "raise"

* ext/probe/probe.c: new extension for application defined probes.

* ext/probe/extconf.rb: ditto.

* configure.in (--with-tracing-model): new option to choose a tracing
  mechanism.
  (DTRACE): new substitution. name of dtrace(1).
  (RUBY_TRACING_MODEL): new substitution.
  (DTRACE_OBJ): ditto.
  (MINIDTRACE_OBJ): ditto.
  (GOLFDTRACE_OBJ): ditto.
  (LIBRUBY_DTRACE_OBJ): ditto.
  (RUBY_DTRACE_POSTPROCESS): new macro. checks whether the dtrace on 
  the system needs postprocessing.
  (RUBY_DTRACE_BSD_BROKEN): new macro. checks whether the dtrace
  supports USDT.

* Makefile.in: 
  (DTRACE): new variable. name of dtrace(1).
  (TRACING_MODEL): new variable. name of the chosen tracing mechanism.
  (DTRACE_OBJ): same as the one in configure.in.
  (MINIDTRACE_OBJ): ditto.
  (GOLFDTRACE_OBJ): ditto.
  (LIBRUBY_DTRACE_OBJ): ditto.
  (CPPOUTFILE): new substitution. necessary for generating dtrace.d
  (trace_none.h): new target for TRACING_MODEL=none
  (RUBY_H_INCLUDES): appended a header for tracing.
  (distclean-local): also removes preprocessed version of dtrace.d
  ($(LIBRUBY_A)): needs $(LIBRUBY_DTRACE_OBJ) if dtrace needs 
  postprocessing.
  ($(PROGRAM)): ditto.
  (golf): ditto.
  (miniruby): ditto.
  ($(arch_hdrdir)/ruby/dtrace.d): new target. preprocessed verson 
  of defs/dtrace.d. generated if necessary.
  ($(arch_hdrdir)/ruby/trace_dtrace.h): new target.
  definition of probes.
  ($(LIBRUBY_DTRACE_OBJ)): new target. generated if dtrace needs 
  postprocessing.
  ($(DTRACE_OBJ)): ditto.
  ($(MINIDTRACE_OBJ)): ditto.
  ($(GOLFDTRACE_OBJ)): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-03 15:36:17 +00:00
naruse f9bef8b944 * include/ruby/ruby.h (RREGEXP_SRC_END): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-30 10:44:10 +00:00
naruse 9db87ea5b9 * include/ruby/defines.h (INFINITY): this is float.
* include/ruby/defines.h (NAN): ditto.

* numericc.c (rb_infinity): change content as float.

* numericc.c (rb_nan): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-30 10:44:02 +00:00
naruse 7ed0640ffb Add Float::INFINITY and Float::NAN.
* numeric.c (Init_Numeric): Add Float::INFINITY and Float::NAN.
  [ruby-dev:1657] [ruby-dev:4760] [ruby-list:7023] [ruby-list:46690]
  [ruby-core:26632] [ruby-talk:41352] [ruby-talk:203333]

* include/ruby/defines.h (INFINITY): defined.

* include/ruby/defines.h (NAN): defined.

* include/ruby/util.h (ruby_div0): removed.

* numeric.c (fix_pow): use INFINITY and NAN instead of ruby_div0(1.0).

* marshal.c (r_object0): ditto.

* bignum.c (big_fdiv): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-29 07:05:39 +00:00
nobu e6a8408c2c * iseq.c (iseq_s_disasm): return nil for native methods.
[ruby-core:27226], [Bug#2499]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-23 06:22:48 +00:00
nobu 11aa6c4107 * marshal.c (w_object): dump instance variables when using
marshal_dump.   [ruby-core:24211]

* variable.c (rb_ivar_count): added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-05 10:25:28 +00:00
akr ff9d908832 * include/ruby/ruby.h (rb_bug_errno): declared.
* include/ruby/intern.h (rb_strerrno): declaration removed.

* error.c (rb_strerrno): make it static.  return NULL for unknown
  errors.
  (rb_bug_errno): defined.

* thread_pthread.c: use rb_bug_errno.

* signal.c (ruby_signal): use rb_bug_errno.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24 11:03:51 +00:00
nobu d7ffefb405 * error.c (rb_strerrno): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24 01:00:02 +00:00
akr 3302b8fff5 * include/ruby/intern.h (rb_strerrno): declared.
* template/known_errors.inc.tmpl: generate defined_error() and
  undefined_error() instead of set_syserr.

* error.c (Init_syserr): define defined_error() and undefined_error()
  to follow the above change.
  (rb_strerrno): defined.

* thread_pthread.c: show error message and errno macro name with
  rb_bug.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24 00:26:52 +00:00
mame 9ea0bed1a3 * include/ruby/ruby.h (rb_classext_t): annotate @internal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-15 16:59:31 +00:00
nobu 255578c7b5 * include/ruby/st.h (SIZEOF_ST_INDEX_T): moved from st.c for
Init_RandomSeed().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-04 07:06:13 +00:00
shyouhei 632aa7a0fc * include/ruby/ruby.h (NUM2CHR): prefix __extension__ for
braced-groups within expressions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-04 06:54:42 +00:00
nobu 22bd95ded4 * include/ruby/ruby.h (RSTRING_END): trivial optimization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-29 19:47:28 +00:00
matz 0580ba0611 * array.c (rb_ary_to_ary): do not use #respond_to? to detect
to_ary.  Just call.  [ruby-core:23738]

* eval.c (rb_check_funcall): new function with method existence
  check.  returns Qundef when the method does not exist.

* enumerator.c (enumerator_rewind): just call method, using
  rb_check_funcall().  [ruby-core:23738]

* error.c (exc_equal): ditto.

* object.c (convert_type): ditto.

* error.c (rb_name_err_mesg_new): export function.

* eval.c (make_exception): ditto.

* io.c (pop_last_hash): return early when the last argument is nil.

* io.c (rb_io_puts): treat T_STRING specially for small
  optimization. 

* vm_eval.c (raise_method_missing): skip method call if possible
  using rb_method_basic_definition_p().

* vm_eval.c (method_missing): ditto.

* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_debug): test
  suites changed to ignore exceptions caused by just-call policy.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-29 04:55:10 +00:00
matz ba3bfda7a2 * hash.c (rb_hash_set_default_proc): checks arity of defalt_proc
of a Hash.  [ruby-core:26087]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-24 16:53:11 +00:00
usa a07dbf0ee9 * include/ruby/win32.h (finite, scalb): inline'ed non-standard
identifier macros.  [ruby-core:2234]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-20 07:43:17 +00:00
nobu 2503de61fc * include/ruby/ruby.h (RB_GC_GUARD_PTR): workaround for gcc
optimization.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-11 00:04:10 +00:00
nobu eac0bd9714 * include/ruby/ruby.h (ruby_exec_node): declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-10 23:48:15 +00:00
akr f65dbbd24a * ext/curses/curses.c: use rb_thread_blocking_region to avoid
rb_read_check.  This makes other threads runnable in getstr and
  wgetstr.
  (getch_func): extracted from curses_getch.
  (curses_getch): use rb_thread_blocking_region with getch_func.
  (getstr_func): extracted from curses_getstr.
  (curses_getstr): use rb_thread_blocking_region with getstr_func.
  (wgetch_func): extracted from window_getch.
  (window_getch): use rb_thread_blocking_region with wgetch_func.
  (wgetstr_func): extracted from window_getstr.
  (window_getstr): use rb_thread_blocking_region with wgetstr_func.

* include/ruby/io.h (rb_read_check): deprecated because it access
  internal of stdio.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-10 10:49:47 +00:00
nobu f87132b45f * include/ruby/intern.h (Init_jump): removed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-10 07:28:15 +00:00
nobu d167cfd196 * include/ruby/ruby.h (rb_long2int): evalates the argument only
once.

* struct.c (rb_struct_alloc): check array length overflow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-07 07:06:32 +00:00
usa 4e389756ec * win32/{setup.mak,Makefile.sub,win32.c},include/ruby/win32.h (RT_VER):
split compiler specification and runtime library specification.

* win32/Makefile.sub (LD_SHARED*, config.status): no need to embbed
  manifest if not exist.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-01 05:19:19 +00:00
akr 18a07e9d4b * include/ruby/intern.h (rb_struct_iv_get): deprecated because it is
not used and access internal structure.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29 13:25:54 +00:00
naruse f7554133b2 * encoding.c (rb_enc_unicode_p): defined.
Returns 1 when the encoding is Unicode series
  other than UTF-7 else 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29 00:34:00 +00:00
naruse e0af046ad0 * hash.c (rb_f_getenv): use rb_filesystem_str_new_cstr
instead of rb_str_new2.
  ENV['PATH'].encoding should be Filesystem Encoding
  because its content is related to filesystem.
  see [ruby-dev:39393]

* hash.c (env_fetch): ditto.

* string.c (rb_filesystem_str_new): defined.

* string.c (rb_filesystem_str_new_cstr): ditto.

* include/ruby/intern.h (rb_filesystem_str_new): added.

* include/ruby/intern.h (rb_filesystem_str_new_cstr): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-28 19:24:18 +00:00
naruse ff504d3cc9 * include/ruby/st.h: include inttypes.h and stdint.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-28 19:24:10 +00:00
duerst 9d7e47114c include/ruby/st.h: aligned prototype of st_hash_uint32 with function
definition (fixing compiling problem on cygwin)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-28 10:08:46 +00:00
nobu f2103ee4a9 * st.c: moved murmur hash from string.c. [ruby-dev:39376]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-26 14:29:13 +00:00
nobu f23486592a * include/ruby/intern.h (rb_hash_{start,uint32,uint,end}): fixed
prototypes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-26 07:26:46 +00:00
usa d70e9a5568 * win32/win32.c, include/ruby/win32.h (rb_w32_access): new function to
replace MSVCRT's access().
  [ruby-core:25761]

* file.c (eaccess): workaround for recent MSVCRT is no longer needed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-25 07:04:25 +00:00
nobu 21367ae077 * include/ruby/ruby.h (rb_type): forward declaration to suppress a
warning.  a patch from Naohisa Goto at [ruby-dev:39350]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18 15:02:21 +00:00
nobu d36c76dc71 * common.mk (eval.o): needs vm.h.
* eval.c (ruby_cleanup): destruct current VM before exit.

* gc.c (rb_objspace_free): free object space.

* vm.c (ruby_vm_destruct): destruct and free VM struct.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18 07:29:17 +00:00
marcandre 1796522f10 * thread.c (rb_exec_recursive_outer, rb_exec_recursive): Added method to short-circuit to the outermost level in case of recursion
* test/ruby/test_thread.rb (test_recursive_outer): Test for above

* hash.c (rb_hash_hash): Return a sensible hash for in case of recursion [ruby-core:24648]

* range.c (rb_range_hash): ditto

* struct.c (rb_struct_hash): ditto

* array.c (rb_array_hash): ditto

* test/ruby/test_array.rb (test_hash2): test for above

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-15 21:30:50 +00:00
nobu 4f041dafbe * debug.c, parse.y: fixed types.
* node.h (nd_line): limit to int.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-14 07:39:16 +00:00
nobu e4259b7cc5 * include/ruby/ruby.h (RB_TYPE_P): should not use BUILTIN_TYPE for
special constants.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-14 01:44:48 +00:00
usa d8e8849e35 * include/ruby/ruby.h (NUM2INT, NUM2LL, INT2NUM, UINT2NUM),
(LONG2NUM, ULONG2NUM, NUM2CHR): get rid of backward references of
  macros.  the code couldn't compile by VC.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-14 01:01:19 +00:00
nobu 231fdd86ae * configure.in (XLDFLAGS): link startup code with ObjC support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-13 09:48:45 +00:00
nobu df3ae4e2b5 * include/ruby/ruby.h (rb_special_const_p): fixed typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-13 03:10:24 +00:00
nobu 8d0bcdb016 * include/ruby/ruby.h (SYM2ID): needs parens.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-13 03:07:51 +00:00
nobu 73b86a9be9 * include/ruby/ruby.h (NUM2INT, NUM2LL, INT2NUM, UINT2NUM),
(LONG2NUM, ULONG2NUM, NUM2CHR, rb_type_p, rb_special_const_p):
  GCC specific optimization.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-13 03:04:53 +00:00
nobu 9ad26a3d24 * include/ruby/win32.h (fstat): override if large file support is
enabled.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-11 04:57:40 +00:00
ko1 e519c9d960 * include/ruby/ruby.h (rb_data_type_t): Add comments.
And add a member variable "data", a multi-purpose storage
  area for rb_data_type.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-10 20:02:11 +00:00
takano32 bc664b878c Wed Sep 9 15:24:32 2009 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
* include/ruby/st.h : revert previous commit.
	* ext/objspace/objspace.c : remove st_memsize declare.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 06:27:35 +00:00
takano32 103b471075 Wed Sep 9 14:07:19 2009 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
* include/ruby/st.h : fix duplicate st_memsize declare.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 05:08:45 +00:00
nobu 78ab4258ff * st.c (st_free_table): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 04:10:42 +00:00
nobu b46cd0e400 * include/ruby/ruby.h (rb_data_type_struct): constified dsize.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 02:11:35 +00:00
nobu e6dd856d73 * st.c (st_init_*table_with_size): use st_index_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08 13:18:13 +00:00
nobu 31b7ae00c0 * include/ruby/st.h (st_hash_func): use st_index_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08 13:10:04 +00:00
nobu 84255e0485 * vm_method.c (rb_remove_method_id): exported.
* numeric.c (num_sadded): fix for non-ascii method name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-27 09:31:11 +00:00
nobu 9676023607 * random.c (random_rand): unified random_int and random_float.
[ruby-dev:39158].  and fixes [ruby-core:24655], [ruby-core:24677],
  [ruby-core:24679].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26 10:20:30 +00:00
usa 9096abd36a * include/ruby/missing.h (vsnprintf): rollback a part of r24179, because
it's meaningless.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-24 10:00:18 +00:00
naruse 7fa7345609 Rename FMODE_STRIP_BOM to FMODE_SETENC_BY_BOM.
* include/ruby/io.h, io.c (FMODE_SETENC_BY_BOM):
  renamed from FMODE_STRIP_BOM.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-21 06:17:06 +00:00
naruse 249697855e \d, \s and \w are now non Unicode class. [ruby-dev:39026]
* include/ruby/oniguruma.h
  (ONIGENC_CTYPE_SPECIAL_MASK): added.
  (ONIGENC_CTYPE_D): ditto.
  (ONIGENC_CTYPE_S): ditto.
  (ONIGENC_CTYPE_W): ditto.

* regparse.c: \d, \s and \w are now non Unicode class.
  [ruby-dev:39026]
  (fetch_token_in_cc): use ONIGENC_CTYPE_[DSW] for \d/\s/\w.
  (fetch_token): ditto.
  (add_ctype_to_cc): add routines for ONIGENC_CTYPE_[DSW].
  (parse_exp): ditto.

* test/ruby/test_regexp.rb (TestRegexp#test_char_class):
  add tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-15 16:01:33 +00:00
nobu 19b24f499b * include/ruby/ruby.h (rb_check_safe_str): deprecated.
* ext/openssl/ossl_x509store.c (ossl_x509store_add_{file,path}):
  replaced deprecated funtion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-14 11:03:22 +00:00
nobu 31f4a82942 * class.c (rb_define_class_id_under, rb_define_module_id_under):
new functions to define a nested class/module with non-ascii
  name.

* struct.c (make_struct): use name with encoding.

* struct.c (inspect_struct): ditto.  [ruby-core:24849]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-12 06:32:21 +00:00
nobu 60d1320326 * include/ruby/intern.h (rb_path2class): no deprecation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-10 12:45:33 +00:00
nari de5f15bbe4 * gc.c: reject unused longlife gc.
* debug.c: ditto.

* include/ruby/intern.h: ditto.

* include/ruby/ruby.h: ditto.

* iseq.c: ditto.

* node.h: ditto.

* vm_insnhelper.c: ditto.

* vm_insnhelper.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-10 02:40:34 +00:00
nobu 3ece383660 * marshal.c (class2path, w_unique, w_extended, w_class, w_uclass):
deal with non-ascii class path.  [ruby-core:24790]

* marshal.c (r_unique, path2class, path2module, obj_alloc_by_path),
  (r_object0): ditto.

* variable.c (rb_path_to_class): new encoding-aware function to
  get a class from its name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-09 21:55:55 +00:00
naruse 60ab77a16a Warn duplicated characters in character class of regexp. [ruby-core:24593]
* include/ruby/oniguruma.h (ONIG_SYN_WARN_CC_DUP): defined.
* regparse.h (ScanEnv): add warnings_flag.
* regparse.c (CC_DUP_WARN): defined for warn duplicated characters in
  character class of regexp. [ruby-core:24593]
  (add_code_range_to_buf): add CC_DUP_WARN.
  (next_state_val): add CC_DUP_WARN.
  (OnigSyntaxRuby): add ONIG_SYN_WARN_CC_DUP.
  (SET_ALL_MULTI_BYTE_RANGE): add env to arguments.
  (add_code_range): ditto.
  (add_code_range_to_buf): ditto.
  (not_code_range_buf): ditto.
  (or_code_range_buf): ditto.
  (and_code_range1): ditto.
  (and_code_range_buf): ditto.
  (and_cclass): ditto.
  (or_cclass): ditto.
  (add_ctype_to_cc_by_range): ditto.
  (add_ctype_to_cc): ditto.
  (parse_char_class): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-04 04:14:38 +00:00
nobu b8b083dbd5 * insns.def (defineclass): preserve encoding of class/module
names.  [ruby-core:24600]

* variable.c (rb_set_class_path_string): set class path with a
  string value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-30 07:45:42 +00:00
nobu 2b2a9a23d0 * include/ruby/intern.h (rb_*str_new_cstr, rb_str_buf_new_cstr),
(rb_str_buf_cat2, rb_str_cat2, rb_exc_new2): suppress warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-27 10:03:12 +00:00
azav 6c4e4f9a4b * include/ruby/defines.h [__SYMBIAN32__]: defined TRUE and FALSE to match changes in bignum.c and array.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-25 15:19:26 +00:00
usa 9dd0d27156 * win32/win32.[ch] (recvmsg, sendmsg): new functions to support recvmsg/
sendmsg like UNIX. these functions are experimental and not tested
	  well. bug reports are welcome.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-21 04:38:20 +00:00
nobu b3b7cd5f0e * include/ruby/defines.h (TRUE, FALSE): for internal use.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18 07:03:15 +00:00
nobu f3d022543e * random.c (rb_random_{int32,real,bytes,int}): added functions for
extension libraries.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18 00:16:25 +00:00
usa 436b2f887a * include/ruby/win32.h: include winsock headers in extern "C++" for
C++ extension libraries.

	* include/ruby/missing.h (vsnprintf): workaround for VC++.
	  [ruby-core:23096]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-17 21:33:05 +00:00
nobu 5e65d8f433 * bignum.c (rb_big_new, rb_bigzero_p), range.c (rb_range_values):
added for random.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-16 06:52:29 +00:00
ko1 c330876d7c * method.h, vm_core.h: add rb_method_entry_t. Remove nodes around
method management.  This change affect some VM control stack structure.
* vm.c, vm_insnhelper.c, vm_method.c, vm_eval.c: ditto.  and make some
  refactoring.
* insns.def, class.c, eval.c, proc.c, vm_dump.c : ditto.
* vm_core.h, compile.c (iseq_specialized_instruction): remove
  VM_CALL_SEND_BIT.  use another optimization tech for Kernel#send.
* node.h: remove unused node types.
* ext/objspace/objspace.c (count_nodes): ditto.
* gc.c: add mark/free functions for method entry.
* include/ruby/intern.h: remove decl of
  rb_define_notimplement_method_id().  nobody can use it
  because noex is not opend.
* iseq.c (iseq_mark): fix to check ic_method is available.
* iseq.c (rb_iseq_disasm): fix to use rb_method_get_iseq().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15 14:59:41 +00:00
nobu 5cc13fcb22 * include/ruby/ruby.h (rb_obj_{untrust,untrusted,trust}): added
prototypes.  [ruby-dev:38756]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10 02:41:44 +00:00
naruse 634cfdc6e6 Set encoding and strip bom when modeenc string is "r:foo-bom" [ruby-dev:37236]
* include/ruby/io.h (FMODE_STRIP_BOM): new constant.

* io.c (io_encname_bom_p): judge whether the encoding name
  is *-bom or not.
  (parse_mode_enc): drop "-bom".
  (rb_io_modestr_fmode): set FMODE_STRIP_BOM if needed.
  (rb_io_extract_modeenc): ditto.
  (io_strip_bom): strip bom if exists.
  (io_set_encoding_by_bom): set encoding if there is bom.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-09 14:47:48 +00:00
ko1 9e60743008 * include/ruby/ruby.h:
rename
  "...TypeStruct" and "typed_struct" to
  "TypedData..." and "typeddata", respectively.
  rename
  rb_data_type_t#name to
  rb_data_type_t#wrap_struct_name.
* error.c, gc.c, iseq.c, vm.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07 20:28:27 +00:00
nobu ac3c2866c7 * error.c (rb_typed_struct_is_kind_of): new function to see if the
given typed struct.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07 07:54:28 +00:00
nobu 7bb9cc23a1 * error.c (rb_check_typed_struct): new function to check typed
struct.

* include/ruby/ruby.h (Check_TypedStruct, Data_Get_TypedStruct):
  new macro to check typed struct.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07 04:44:54 +00:00
akr 2f8b6234cd * include/ruby/intern.h (rb_time_num_new): declared.
* time.c (nsec2timev): extracted from time_new_internal.
  (time_new_internal): change argument to VALUE.
  (rb_time_new): follow the argument change.
  (rb_time_nano_new): ditto.
  (rb_time_num_new): new function.

* ext/socket/ancdata.c (ancillary_timestamp): use rb_time_num_new to
  represent struct bintime preciously.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01 12:11:53 +00:00
matz 5d7a215f6e * re.c (reg_match_pos): adjust offset based on characters, not
bytes.  [ruby-dev:38722]

* string.c (rb_str_offset): new function.

* string.c (rb_str_index_m): no call to rb_reg_adjust_startpos().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-30 09:06:48 +00:00
nobu 23a32d6444 * include/ruby/oniguruma.h, include/ruby/re.h, re.c, regcomp.c,
regenc.c, regerror.c, regexec.c, regint.h, regparse.c: use long.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-30 02:08:54 +00:00
nobu 8b920b4ac8 * file.c (rb_get_path_check): check with given safe level.
* file.c (rb_find_file_ext_safe, rb_find_file_safe): ditto.

* safe.c (rb_insecure_operation): function to raise security error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-23 12:28:16 +00:00
nobu ff1b8b7593 * file.c (rb_find_file_ext, rb_find_file): no needs to expand
paths with tilde twice.

* load.c (rb_f_load): load the given path directly if not found in
  load_path.

* load.c (search_required): search file in specified safe level.

* load.c (rb_require_safe): path to load is already searched in
  search_required().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-23 07:05:04 +00:00
ko1 af0429b54e * st.c, include/ruby/st.h (st_memsize): added. This function returns
the memory usage of st_talbe.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16 22:03:12 +00:00
ko1 a74d12dc28 * include/ruby/ruby.h: New structure RTypedData, added.
This structure incldues more explicit type information for
  T_DATA objects.  If RData(obj)->dfree is immediate value `1' on
  T_DATA object obj, obj is needed to be accessed with RTYPEDDATA(obj)
  instead of RDATA(obj).  A RTypedData structure points the structure
  rb_typed_data_t.  rb_typed_data_t includes information such as the
  type name of this data, mark and free function what RData includes,
  and memsize function show how data consuming the memory size.
  Note that you do not need any change existing T_DATA objects.
  If you use RDataType instead of RData on T_DATA object,
  you can specify explicit type information.
* gc.c (rb_data_typed_object_alloc, rb_objspace_data_type_memsize,
  rb_objspace_data_type_name): added.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16 21:36:50 +00:00
ko1 79b62da9b4 * thread.c: rename functions which require a parameter
"rb_thread_t *", the prefix to be rb_threadptr_ instead of
  rb_thread_.
* thread.c (rb_thread_add_event_hook(), rb_thread_remove_event_hook):
  change the parameter type from rb_thread_t * to VALUE.
* eval.c, eval_error.c, eval_intern.h, signal.c, vm_core.h, vm_eval.c:
  ditto.
* include/ruby/intern.h: remove decl of rb_thread_signal_raise() and
  rb_thread_signal_exit().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-08 16:14:06 +00:00
nobu 4c79d4bee2 * include/ruby/intern.h (rb_exc_new2): optimization for literal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-01 01:41:43 +00:00
matz 844a6890c6 * st.c (st_insert2): new function with processing new key,
e.g. copy.

* hash.c (rb_hash_aset): use st_insert2() to reduce redundant
  st_lookup calls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-27 15:56:14 +00:00
nobu 8e86bd59c0 * common.mk (bignum.o, numeric.o): depend on util.h.
* bignum.c, marshal.c: fixed types.

* numeric.c (infinite_value): use ruby_div0.

* include/ruby/util.h (ruby_div0): moved from marshal.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-26 04:58:15 +00:00
nobu 5a9f87f179 * include/ruby/ruby.h (FilePathValue): prevent from GC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-25 20:39:30 +00:00
nobu a273dc9b16 * include/ruby/ruby.h (NUM2LONG): added GCC specific optimization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-25 20:38:06 +00:00
nobu 02fb261ec1 * thread.c (rb_exec_recursive_paired): new function for proper
handling of recursive arrays.  [EXPERIMENTAL] [ruby-core:23402]

* array.c (rb_ary_equal, rb_ary_eql, rb_ary_cmp): use above.

* hash.c (hash_equal): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-24 13:48:23 +00:00
nobu c6a24c45f8 * include/ruby/ruby.h (RB_EVENT_HOOKS_HAVE_CALLBACK_DATA):
new macro for compatibility check.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-21 03:07:45 +00:00
nobu 060f433f48 * include/ruby/ruby.h (rb_long2int, RARRAY_LENINT): check long to
cast to int.  [ruby-dev:38508]

* struct.c, vm_eval.c, vm_insnhelper.c: use RARRAY_LENINT.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-20 16:43:41 +00:00
matz 0980fe7903 * encoding.c (rb_enc_fast_mbclen): faster mbclen for strings known
to be valid.

* string.c (enc_strlen): coderange specified version of
  rb_enc_strlen().  use rb_enc_fast_mbclen() if coderange is 7bit
  or valid.

* string.c (str_gsub): use rb_enc_fast_mbclen().

* string.c (rb_str_reverse, rb_str_split_m, rb_str_each_char,
  scan_once): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-20 04:44:36 +00:00
matz 91e5ba1cb8 * encoding.c (rb_enc_codepoint_len): combine rb_enc_codepoint()
and rb_enc_codelen() in one function to reduce calls.

* encoding.c (rb_enc_codepoint): compatibility function.

* sprintf.c (rb_str_format): use rb_enc_codepoint_len().

* string.c (rb_str_inspect, rb_str_upcase_bang,
  rb_str_downcase_bang, rb_str_capitalize_bang,
  rb_str_swapcase_bang, trnext, tr_trans, rb_str_delete_bang,
  rb_str_squeeze_bang, rb_str_count, rb_str_split_m,
  rb_str_each_line, rb_str_each_codepoint, rb_str_lstrip_bang,
  sym_printable): ditto.

* transcode.c (make_econv_exception): use rb_enc_mbc_to_codepoint()

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-19 16:59:22 +00:00
nari 57b83a5191 * gc.c: add longlife garbage collection. [ruby-dev:38423]
(NORMAL_HEAPS_USED): new macro.
  (LONGLIFE_ALLOCATE_HEAPS_MIN): ditto.
  (add_longlife_heaps_slot): new function.
  (rb_newobj_from_longlife_heap): ditto.
  (rb_newobj_longlife): ditto.
  (rb_node_newnode_longlife): ditto.
  (rb_gc_write_barrier): ditto.
  (remembered_set_recycle): ditto.
  (rb_gc_mark_remembered_set): ditto.
  (clear_mark_longlife_heaps): ditto.
  (gc_sweep_for_longlife): ditto.
  (assign_heap_slot): new argumnent to longlife heaps slot.
  (add_freelist): ditto.
  (gc_sweep): avoid lonlife heap slot. set longlife_collection
   flag at add heap.
  (rb_gc_force_recycle): avoid mark object and remembered_set
   object.
  (garbage_collect): add longlife collection.
  (rb_gc_start): invoke longlife collection.
  (gc_profile_record_get): for longlife collction profile.
  (gc_profile_result): ditto.

* include/ruby/intern.h (rb_gc_write_barrier): declared.

* include/ruby/ruby.h (FL_REMEMBERED_SET): renamed from FL_RESERVED.

* debug.c (FL_REMEMBERED_SET): ditto.

* insns.def (setinlinecache): insert write barrier.

* vm_insnhelper.c (vm_method_search): ditto.

* set_relation (set_relation): use longlife object.

* vm.c (vm_define_method): ditto.

* vm_core.h (NEW_INLINE_CACHE_ENTRY): ditto.

* vm_method.c (rb_add_method): ditto.

* class.c (rb_add_method): ditto.

* node.h (NEW_NODE_LONGLIFE): new macro.
  (rb_node_newnode_longlife): declared.
					    


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-13 14:08:26 +00:00
nobu 8265f3125e * include/ruby/version.h: extracted the extensions interface and
the never-changable info.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-13 06:23:20 +00:00
nobu 013b277316 * string.c, include/ruby/encoding.h: fixed types.
* include/ruby/encoding.h (rb_enc_nth): long is used for index.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-07 05:16:26 +00:00
nobu c7853b4344 * eval.c (ruby_cleanup): the order of local variables on stack is
undefined.  should use outermost VALUE for ruby_init_stack.

* gc.c (ruby_get_stack_grow_direction, Init_stack): allows volatile
  pointer.

* thread_*.c (ruby_init_stack): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-19 05:43:20 +00:00
akr 8b27d153d2 * class.c (rb_define_method_id): use rb_define_notimplement_method_id
if rb_f_notimplement is given.
  (rb_define_protected_method): ditto.
  (rb_define_private_method): ditto.
  (rb_define_method): use rb_define_method_id.

* include/ruby/intern.h (rb_f_notimplement): declared.
  (rb_define_notimplement_method_id): declared.

* proc.c (method_inspect): show not-implemented.

* vm_method.c (notimplement_body): new variable.
  (rb_notimplement_body_p): new function.
  (rb_method_boundp): return false if not implemented.
  (rb_f_notimplement): new function.
  (rb_define_notimplement_method_id): new function.

* process.c (rb_f_fork): use rb_f_notimplement if not implemented.

* file.c (rb_file_s_lchmod): use rb_f_notimplement if not implemented.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-16 14:17:14 +00:00
nobu 03dbd024ee * include/ruby/intern.h (rb_fd_resize): does nothing on Win32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-05 09:02:57 +00:00
nobu a3e7e369bc * include/ruby/intern.h (Init_stack): moved.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-05 08:59:02 +00:00
nobu 08e5b6de32 * include/ruby/intern.h (RB_NUM_COERCE_FUNCS_NEED_OPID): macro to
check compatibility.  [ruby-dev:38162]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-04 08:05:17 +00:00
matz d98da36b8c * thread.c (rb_thread_fd_select): new function to call select
using rb_fdset_t.

* io.c (select_internal): use rb_thread_fd_select instead of
  rb_thread_select.  based on the patch from Kengo Matsuyama.
  [ruby-dev:38221]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-01 04:56:51 +00:00
akr c4049f4cb6 * io.c (rb_mWaitReadable): defined.
(rb_mWaitWritable): defined.
  (io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN.
  (rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and
  EAGAIN.

* error.c (make_errno_exc): extracted from rb_sys_fail.
  (rb_mod_sys_fail): new function.

* include/ruby/ruby.h (rb_mod_sys_fail): declared.
  (rb_mWaitReadable): declared.
  (rb_mWaitWritable): declared.

* ext/socket/init.c (rsock_s_recvfrom_nonblock): extend
  IO::WaitReadable on EWOULDBLOCK and EAGAIN.
  (rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK,
  EAGAIN, ECONNABORTED and EPROTO.

* ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable
  on EINPROGRESS.

* ext/socket/ancdata.c (bsock_sendmsg_internal): extend
  IO::WaitWritable on EWOULDBLOCK and EAGAIN.
  (bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and
  EAGAIN.

* ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError
  extended by IO::WaitReadable/IO::WaitWritable on
  SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE.

* ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise.
  (ossl_exc_new): new function.

* ext/openssl/ossl.h (ossl_exc_new): declared.

* lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and
  IO::WaitWritable.

  [ruby-core:22539], [ruby-dev:38140] 



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19 11:40:38 +00:00
nobu 375258ed98 * include/ruby/ruby.h ({RSTRING,RBIGNUM}_EMBED_LEN_MAX): made int.
* include/ruby/ruby.h (OBJ_{TAINTED,UNTRUSTED,FROZEN}): return int.

* include/ruby/encoding.h (ENC_CODERANGE): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15 02:17:48 +00:00
nobu afdeb2d35e * include/ruby/ruby.h ({RSTRING,RBIGNUM}_EMBED_LEN_MAX): made int.
* include/ruby/ruby.h (OBJ_{TAINTED,UNTRUSTED,FROZEN}): return int.

* include/ruby/encoding.h (ENC_CODERANGE): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15 02:15:19 +00:00
nobu 8c8f85ed4f * string.c (rb_hash_uint, rb_hash_start, rb_hash_end): use VALUE
rather than unsigned int.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15 02:11:45 +00:00
akr f414bd65ae * string.c (rb_str_subpat): accept capture name.
(rb_str_aref): follow above change.
  (rb_str_aref_m): pass the 2nd argument to rb_str_subpat.
  (rb_str_subpat_set): accept capture name.
  (rb_str_aset): follow above change.
  (rb_str_partition): ditto.
  (rb_str_aset_m): pass the 2nd argument to rb_str_subpat_set.

* include/ruby/intern.h (rb_reg_backref_number): declared.

* re.c (rb_reg_backref_number): defined.

  [ruby-core:21057]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 18:04:21 +00:00
nobu 4de12b6ae9 * util.c (ruby_scan_oct, ruby_scan_hex): use size_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 09:25:20 +00:00
nobu b82b4e6e48 * dln.c (init_funcname_len, dln_find_exe_r, dln_find_file_r): use
size_t.

* file.c (rb_stat_inspect, file_expand_path): ditto.

* util.c (ruby_qsort): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 01:56:42 +00:00
nobu b4bfc3aa79 * include/ruby/ruby.h (bool): not define to get rid of conflict
against curses.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13 08:04:11 +00:00
nobu e9b98f413e * configure.in (AC_HEADER_DIRENT): added.
* include/ruby/ruby.h (NUM2INT, rb_special_const_p): returns true
  and false instead of Qtrue and Qfalse for platforms where VALUE
  is bigger than int.

* gc.c (gc_stress_set), ext/openssl/ossl_asn1.c (decode_bool): got
  rid of variables named `bool'.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13 01:42:21 +00:00
nobu d1abc53721 * array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,
numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c,
  transcode_data.h, util.c, variable.c, vm_dump.c,
  include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c:
  suppress VC type warnings.  [ruby-core:22726]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12 09:16:15 +00:00
akr 53d061ec33 * include/ruby/encoding.h: suppress warnings of overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12 00:16:00 +00:00
nobu 0641a4d83e * include/ruby/win32.h (strcasecmp, strncasecmp): use _ prefixed
versions to suppress warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-10 10:58:49 +00:00
nobu ec46ba5b90 * include/ruby/encoding.h (enc_initialized_p): ENC_UNINITIALIZED
is not defined already.

* include/ruby/encoding.h (ENC_FROM_ENCINDEX): removed because
  depending on a static variable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-05 01:10:41 +00:00
nobu 6e7d7bf5dd * include/ruby/win32.h (WIN95): moved to config.h
* win32/Makefile.sub (config.h): defines WIN95 only if unicows.lib
  is available.

* win32/setup.mak (-unicows-): checks if unicows.lib is available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-04 10:35:28 +00:00
nobu 9fb56049eb * eval.c (rb_longjmp), include/ruby/intern.h (ruby_cleanup): fixed
prototypes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02 01:29:19 +00:00
nobu c660a9c466 * include/ruby/intern.h (rb_io_get_io): added prototype.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-27 08:35:56 +00:00
usa 2c288bf91f * include/ruby/win32.h (rb_w32_wopen): prototype forgotten.
* io.c (rb_sysopen_internal): shouldn't replace undefined chars in this
	  case.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-26 01:58:20 +00:00
nobu 15700ff0be * include/ruby/ruby.h (USE_SYMBOL_AS_METHOD_NAME): Module#methods,
#singleton_methods and so on return Symbols.  [ruby-talk:328775]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 01:19:43 +00:00
mame e722ad99d5 * string.c (rb_hash_uint32, rb_hash_uint, rb_hash_start, rb_hash_end),
include/ruby/intern.h: add Murmurhash API.  [ruby-dev:37784]

* complex.c (nucomp_hash), array.c (rb_ary_hash), time.c (time_hash),
  string.c (rb_str_hsah), object.c (rb_obj_hash), range.c
  (range_hash), struct.c (rb_struct_hash), hash.c (rb_any_hash),
  rational.c (nurat_hash): use Murmurhash.  [ruby-dev:37784]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14 19:55:34 +00:00
nobu e52da91987 * compile.c (compile_array_, defined_expr, iseq_compile_each): hide
and freeze internal literal objects, to prevent from modifying.
  [ruby-dev:37959]

* iseq.c (insn_operand_intern): copy internal literal objects.

* insns.def (putstring, duparray): ditto.

* string.c (rb_str_replace): exported.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-12 10:42:36 +00:00
mame f64018b111 * include/ruby/st.h, st.c: order entries by a linked list instead of
a loop to fix iteration miss when hash is modified during iteration.
  [ruby-dev:37910]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 14:34:13 +00:00
nobu 5baafac0b7 * include/ruby/backward/rubysig.h (rb_thread_blocking_region_begin),
(rb_thread_blocking_region_end): marked as deprecated.

* include/ruby/backward/rubysig.h (TRAP_BEG): fix for C++.  a
  patch from Aman Gupta at [ruby-core:21934]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 13:44:21 +00:00
nobu e1fc88726e * include/ruby/backward/rubysig.h: extern "C" was missing.
[ruby-core:21929]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 10:05:26 +00:00
nobu 5610e5dc70 * configure.in (--with-arch): added new option to support
universal binary.  replaced --enable-fat-binary option which
  didn't work actually.

* configure.in (RUBY_FUNC_ATTRIBUTE): added conditional test.

* configure.in (ac_cv_type_getgroups): decalared because getgroups()
  fills rest of the buffer with garbages on Rosetta.

* configure.in (alloca): defines only for powerpc, but always
  create empty object to suppress ld warning.

* configure.in (LIBRUBY_DLDFLAGS): set compatibility version with
  TEENY.

* configure.in (CFLAGS, LDFLAGS): separates ARCH_FLAG.

* configure.in (arch): renamed to "universal" from "fat".

* Makefile.in (ARCH_FLAG): added.

* include/ruby/defines.h (WORDS_BIGENDIAN): uses
  AC_APPLE_UNIVERSAL_BUILD.

* missing/alloca.c (alloca): defines only if C_ALLOCA is defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-07 09:02:50 +00:00
azav c4fe2b2840 [__SYMBIAN32__]: included <sys/select.h> for fd_set definition
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 13:09:44 +00:00
akr 74063bf4d3 * include/ruby/intern.h (rb_run_exec_options_err): renamed from
rb_run_exec_options.
  (rb_exec_err): renamed from rb_exec.
  (rb_fork_err): renamed from rb_fork.
  (rb_spawn_err): renamed from rb_spawn.
  (rb_run_exec_options): declared with 1.9.1 compatible signature.
  (rb_exec): ditto.
  (rb_fork): ditto.
  (rb_spawn): ditto.

* process.c (rb_run_exec_options_err): renamed from
  rb_run_exec_options.
  (rb_exec_err): renamed from rb_exec.
  (rb_fork_err): renamed from rb_fork.
  (rb_spawn_err): renamed from rb_spawn.
  (rb_run_exec_options): defined.
  (rb_exec): ditto.
  (rb_fork): ditto.
  (rb_spawn): ditto.

* io.c: follow above change.

* ext/pty/pty.c: follow above change.

  [ruby-dev:37893]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 11:33:19 +00:00
akr 074a374c86 * include/ruby/ruby.h (STR2CSTR): removed.
(rb_str2cstr): removed.

* object.c (rb_str2cstr): removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-31 13:30:17 +00:00
usa 9e83ce20b1 * revert previous revision. it's already out-of-date.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 07:13:40 +00:00
usa a3e8d63a75 * include/ruby/win32.h, win32/win32.c (rb_w32_is_valid_fd): new function
to validate fd.

	* io.c (rb_io_initialize): check fd with above function.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 06:55:20 +00:00
nobu 877dca1e27 * include/ruby/io.h (typedef struct rb_io_t):
* io.c (flush_before_seek):
* io.c (io_fillbuf):
* io.c (io_fread):
* io.c (io_getpartial):
* ruby.c (load_file_internal):


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-21 04:56:06 +00:00
nobu 4e6ad7d910 * include/ruby/defines.h (RUBY_ALIAS_FUNCTION_TYPE): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 08:28:28 +00:00
nobu 49e685a0af * include/ruby/defines.h (RUBY_ALIAS_FUNCTION2): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 08:24:10 +00:00
nobu 99e9aca096 * include/ruby/ruby.h (VALUE): use unsigned long or long long
instead of uintptr_t, since many %lx and so on are still used.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-16 09:31:05 +00:00
usa f1e87dd9ac * include/ruby/ruby.h (PRI_PTRDIFF_PREFIX): must define as string.
if not, cause compile error in using PRI?VALUE.

	* win32/Makefile.sub (config.h): add SIZEOF_INTPTR_T and
	  SIZEOF_UINTPTR_T for SIZEOF_VALUE.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-16 03:18:09 +00:00
nobu 5b6a192755 * configure.in (RUBY_REPLACE_TYPE): does not define rb_ prefixed
name if no default type is given.

* configure.in (RUBY_DEFINT): checks size.

* include/ruby/ruby.h (VALUE): use uintptr_t if available.

* include/ruby/ruby.h (PRI_PTRDIFF_PREFIX, PRI_SIZE_PREFIX):
  assumes usable if PRIdPTR is defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-16 02:41:26 +00:00
usa 50258b19fd * include/ruby/intern.h, thread.c, win32/Makefile.sub (rb_fdset_t,
rb_fd_init, rb_fd_term, rb_fd_zero, rb_fd_set, rb_fd_clr, rb_fd_isset,
	  rb_fd_select, rb_fd_ptr, rb_fd_max, HAVE_RB_FD_INIT): new type,
	  functions, and macros for Windows.

	* win32/win32.c (extract_fd, rb_w32_select): use rb_fdset_t to expand
	  fd_array if needed.  [ruby-core:19946]

	* win32/win32.c (copy_fd): new funcion for rb_w32_select().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 07:52:22 +00:00
nobu dea3ad3cba * win32/win32.c (internal_cmd_match): extracted from
is_internal_cmd.

* win32/win32.c (argv_size, join_argv): escapes redirection, pipe
  and carret punctuations with carrets.

* win32/win32.c (rb_w32_aspawn): ditto, and redirections and pipe
  have no meanings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 17:21:45 +00:00
usa 7fc5fa69f1 * include/ruby/missing.h, sprintf.c: get rid of a warning of VC++.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-02 14:35:07 +00:00
matz ad00464489 * pack.c (pack_pack): template f should not accept non float
values.  [ruby-dev:37656]

* object.c (rb_to_float): new function to type check floats.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 13:40:33 +00:00
akr b17c5eba46 * io.c (fptr_finalize): close the IO object even if finish_writeconv or
flush is failed.
  (finish_writeconv): don't raise.  return errno or exception.
  (finish_writeconv_arg): removed.
  (finish_writeconv_sync): follow finish_writeconv change.

* transcode.c (rb_econv_make_exception): new function.

* include/ruby/encoding.h (rb_econv_make_exception): declared.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-26 05:04:39 +00:00
akr 423bbf80d5 * process.c (rb_fork): propagete an error message from child to parent.
(rb_f_exec): show details of error in child process on
  exception.
  (save_redirect_fd): add error message arguments.
  (run_exec_dup2): ditto.
  (run_exec_close): ditto.
  (run_exec_open): ditto.
  (run_exec_dup2_child): ditto.
  (run_exec_pgroup): ditto.
  (run_exec_rlimit): ditto.
  (rb_run_exec_options): ditto.
  (rb_exec): ditto.
  (rb_exec_atfork): ditto.
  (rb_spawn_internal): ditto.
  (rb_spawn): ditto.
  (rb_f_system): follow arguments change.
  (proc_daemon): ditto.
  (rb_f_spawn): show details of error in child process on exception.

* io.c (popen_exec): add error message arguments.
  (pipe_open): show details of error in child process on exception.

* include/ruby/intern.h (rb_run_exec_options): add error message
  arguments.
  (rb_exec): ditto.
  (rb_fork): ditto.
  (rb_spawn): ditto.

* ext/pty/pty.c (chfunc): add error message arguments.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 13:15:54 +00:00
usa 0c9fe2130f * include/ruby/st.h: need to include defines.h because LONG_LONG is
defined there.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 05:19:27 +00:00
nobu 9f3b77e435 * configure.in (mingw): no longer uses snprintf and vsnprintf of
msvcrt.

* win32/win32.c (rb_w32_vsnprintf, rb_w32_snprintf): removed.

* win32/Makefile.sub (config.h): vsnprintf exists in VC7 or later.

* win32/mkexports.rb (Exports#initialize): aliases
  rb_w32_vsnprintf and rb_w32_snprintf for binary compatibility.

* sprintf.c (rb_str_format): uses snprintf instead of sprintf.

* numeric.c (flo_to_s, rb_num2long, rb_num2ll): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-22 03:05:20 +00:00
matz 63219d8a24 * io.c (rb_io_extract_encoding_option): "internal_encoding: nil"
to specify no-transcoding.  and other corner case fixed.
  [ruby-dev:37496]

* hash.c (rb_hash_lookup2): new function to look-up hash with
  default value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-19 08:22:45 +00:00
nobu 36eed7bdfb * include/ruby/st.h (size_t): needs stddef.h or stdlib.h.
[ruby-core:20339]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-11 02:11:09 +00:00
nobu 001d393019 * id.h, include/ruby/{intern,oniguruma}.h, regenc.h, regparse.h,
template/*.tmpl: removed trailing garbage spaces.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-09 07:14:13 +00:00
nobu 8e864d1e86 * load.c (rb_get_load_path): returns the load path without
touching.

* load.c (rb_feature_provided): new function to return the loading
  path in addition to rb_provided().

* load.c (search_required): sets path if loading.

* variable.c (autoload_provided): load paths are expanded to check
  if loading.

* variable.c (autoload_node): keeps autoload mark while loading.
  [ruby-core:20235]

* variable.c (rb_const_get_0): loops while autoload mark is set.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 18:29:20 +00:00
akr e44a6c4708 move the previous comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 10:00:10 +00:00
akr db197f296f add comment for select behavior on file descriptors over FD_SETSIZE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 08:52:19 +00:00
nobu cc7ff9d2f9 * include/ruby/intern.h (rb_{external,locale}_str_new_cstr): optimized
versions for literal strings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-11 18:31:06 +00:00
nobu 99cd3c512b * load.c (rb_require_safe): destroys barrier after successfully
loaded, to get rid of loading same library again.  [ruby-core:19798]

* thread.c (rb_barrier_wait): can not wait destroyed barrier.

* thread.c (rb_barrier_destroy): destroys barrier so that no longer
  waited.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-11 18:28:47 +00:00
matz 80d16e7403 * ext/curses/curses.c: curses encoding should obey locale.
* ext/curses/curses.c (curses_getch): 1.9 getch should return one
  character string for single byte string.  wchar_t support may
  follow in the future.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-07 21:42:24 +00:00
nobu 551dfe9d8b * include/ruby/io.h (rb_io_t): added write_lock to serialize.
[ruby-core:19668]

* gc.c (gc_mark_children): mark write_lock.

* gc.c (rb_gc_call_finalizer_at_exit): Mutex also needs to be
  deferred.

* io.c (io_fflush, io_binwrite, fptr_finalize): serializes writing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-07 20:47:02 +00:00
nobu 88a4f33121 * include/ruby/intern.h (rb_mutex_synchronize): fixed prototype.
* thread.c (rb_mutex_synchronize): fixed function name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-03 16:56:49 +00:00
nobu 1f4b40f449 * missing.h: needs RUBY_EXTERN instead of extern for mswin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-03 07:32:57 +00:00
matz 4a3f2a7bc5 * string.c (rb_external_str_new_with_enc): no implicit strlen call.
[ruby-dev:36854]

* string.c (rb_external_str_new_cstr): new function to create
  string from external NUL terminated C string.

* string.c (rb_locale_str_new_cstr): ditto.

* ext/readline/readline.c: now use rb_locale_str_new_cstr().

* test/sdbm/test_sdbm.rb (TestSDBM#test_delete_with_block):
  deleted key to the block may be a copy of specified key.

* test/dbm/test_dbm.rb (TestDBM#test_delete_with_block): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 05:55:22 +00:00
ko1 34d1e9bb25 * include/ruby/vm.h: write a comment.
* common.mk: remove vm.h from any rules.
  vm.h is not needed on this version.
* vm_core.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 20:59:23 +00:00
matz b6ef272d02 * ext/zlib/zlib.c: remove obsolete prototype macros.
* ext/zlib/zlib.c (struct gzfile): add encoding field to gzfile
  structure.

* ext/zlib/zlib.c (rb_gzreader_getc): now works on characters.

* ext/zlib/zlib.c (rb_gzreader_getbyte): new method to retrieve
  single byte.

* ext/zlib/zlib.c (rb_gzreader_readbyte): ditto.

* ext/zlib/zlib.c (rb_gzreader_each_byte): renamed from each_char

* ext/zlib/zlib.c (rb_gzreader_ungetc): allow unget strings.

* ext/zlib/zlib.c (rb_gzreader_ungetbyte): renamed from ungetc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 09:18:34 +00:00
shugo d423b884b8 * io.c, include/ruby/intern.h (rb_io_ascii8bit_binmode): externed.
* ext/socket/socket.c (init_sock): use rb_io_ascii8bit_binmode()
  instead of rb_io_binmode().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 04:31:15 +00:00
matz 6259c87d02 * include/ruby/ruby.h (ExportStringValue): new macro to convert
string in internal encoding to external to export.

* string.c (rb_str_export): new function to do conversion to
  external encoding.

* ext/sdbm/init.c: encoding conversion support.

* ext/dbm/dbm.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 08:05:44 +00:00
matz 52b3e3b97f * string.c (rb_locale_str_new): new function to convert string
from locale to internal encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 07:15:19 +00:00
matz 3f0ec8887f * string.c (rb_external_str_new): a new function to convert from
external encoding to internal encoding.  if something went
  wrong, it returns a string with the external encoding.

* string.c (rb_external_str_new_with_enc): same as above besides
  you can specify the source encoding.

* ruby.c (ruby_set_argv): use rb_external_str_new()

* ruby.c (set_arg0, ruby_script): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 10:36:20 +00:00
mame ca9589aeb0 * io.c (rb_getc, rb_io_fread, rb_io_fwrite, rb_read_pending):
remove deprecated functions which do not work.  [ruby-dev:36697]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 15:18:17 +00:00
nobu 1288965f4e * io.c (Init_IO): $FILENAME and $* must be read-only. [ruby-dev:36698]
* variable.c (*_getter, *_setter, *_marker): made public.

* include/ruby/ruby.h (rb_gvar_*_{getter,setter,marker}): declared.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 11:45:32 +00:00
nobu fb93e65c76 * include/ruby.h: updated macros for headers. [ruby-core:19275]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-10 13:07:07 +00:00
yugui c86ce094e2 * include/ruby/ruby.h: embeds the elements of an array into its
struct RArray for # of elements <= 3.

	* array.c: ditto.

	* gc.c (gc_mark_children): following the change of struct RArray.

	* ext/tk/tcltklib.c (ip_ruby_cmp): ditto.

	* parse.y (coverage): ditto.

	* proc.c (curry): ditto.

	* .gdbinit: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 05:47:04 +00:00
matz baeeebf474 * encoding.c (rb_default_internal_encoding): merged a patch from
Michael Selig <michael.selig at fs.com.au> in [ruby-core:18985].

* io.c (rb_io_ext_int_to_encs): ditto.

* ruby.c (proc_options): support default internal encoding in -E
  option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-07 17:39:44 +00:00
yugui e8ee99ff1a * dln.c: Ruby no longer supports VMS.
* error.c: ditto.

* eval.c: ditto.

* eval_intern.h: ditto.

* include/ruby/defines.h: ditto.

* include/ruby/ruby.h: ditto.

* io.c: ditto.

* process.c: ditto.

* ruby.c: ditto.

* vms/config.h: removed.

* vms/vms.h: ditto.

* vms/vmsruby_private.c: ditto.

* vms/vmsruby_private.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:57:06 +00:00
yugui a8c3540b32 * dln.c: Ruby no longer supports Windows CE.
* eval.c: ditto.

* include/ruby/defines.h: ditto.

* include/ruby/win32.h: ditto.

* ruby.c: ditto.

* strftime.c: ditto.

* win32/Makefile.sub: ditto.

* win32/win32.c: ditto.

* ext/tk/extconf.rb: ditto.

* lib/fileutils.rb: ditto.

* test/fileutils/test_fileutils.rb: ditto.

* wince/*: removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:48:20 +00:00
yugui 642e081879 * dln.c: Ruby no longer supports MacOS 9 or before.
* eval.c: ditto.

* eval_intern.h: ditto.

* ext/extmk.rb: ditto.

* ext/tk/sample/tkextlib/treectrl/demo.rb: ditto.

* ext/tk/stubs.c: ditto.

* file.c: ditto.

* hash.c: ditto.

* include/ruby/defines.h: ditto.

* ruby.c: ditto.

* signal.c: ditto.

* vm_core.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:42:00 +00:00
yugui ae7ea3332b * dln.c: Ruby no longer supports MS-DOS.
* ext/sdbm/_sdbm.c: ditto.

* ext/sdbm/sdbm.h: ditto.

* gc.c: ditto.

* hash.c: ditto.

* include/ruby/defines.h: ditto.

* include/ruby/util.h: ditto.

* io.c: ditto.

* process.c: ditto.

* ruby.c: ditto.

* strftime.c: ditto.

* util.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:33:22 +00:00