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
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
"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
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
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
* 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
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
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
* 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
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
* 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
#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
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
(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
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
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
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
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
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
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
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
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
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
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
* 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
[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
* 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
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
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
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
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