nobu
8489ac41ca
* include/ruby/ruby.h (ALLOCV): new API for exception-safe
...
temporary buffer. [ruby-core:34844]
* string.c (rb_alloc_tmp_buffer, rb_free_tmp_buffer):
implementation of the API.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-26 23:32:22 +00:00
nobu
fea355647e
* include/ruby/io.h: missing prototypes.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-15 00:42:14 +00:00
nobu
dd55661f56
* include/ruby/defines.h (CASEFOLD_FILESYSTEM): HFS+ is case
...
insensitive.
* load.c (loaded_feature_path, rb_feature_p, load_lock): on a
case-insensitive filesystem, loaded features search should
ignore case. [ruby-core:34297]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-10 13:46:47 +00:00
nobu
65ea2eed78
* array.c (rb_ary_modify): export.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05 20:25:50 +00:00
nobu
c8aaf31fdd
* array.c (rb_ary_resize): new utility function. [ruby-dev:42912]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05 20:10:59 +00:00
nobu
2d5bd6b194
* intern.h (VALUE rb_ary_join): I have never seen this function
...
anywhere.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-01 01:59:14 +00:00
usa
90d5bcf910
* re.c (rb_reg_expr_str): need to escape if the coderage is invalid.
...
* error.c, include/ruby/intern.h (rb_compile_error_with_enc): new
function to raise syntax error, with source encoding'ed message.
* parse.y (compile_error): use above function.
[ruby-core:33951] (#4217 )
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-28 09:43:49 +00:00
nobu
5bf72d1fa6
* transcode.c (transcode_loop): call default handler of the given
...
hash, method, proc or [] method as fallback. [ruby-dev:42692]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-07 13:05:26 +00:00
nobu
2d4b0d6261
* hash.c (rb_hash_update_by): new API for Hash#update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-04 02:21:53 +00:00
shyouhei
51da92ea12
* vm.c (ruby_vm_at_exit): new API. This enables extension libs to
...
hook a VM termination. Right now, because the VM we have is
process global, most extensions do not deallocate resources and
leave them to Operating System's reaping userland processes. But
in a future we plan to have multiple VMs to run simultaneously in
a single process (MVM project). At that stage we can no longer
rely on OSes and have to manage every resources to be reclaimed
properly. So it is. For a forward-compatibility reason this API
is introduced now, encouraging you to be as gentle as you can for
your resources; that is, tidy up your room.
* include/ruby/vm.h: ditto.
* vm_core.h (rb_vm_struct): new field.
* vm.c (vm_init2): initialize above new field.
* eval.c (ruby_cleanup): trigger those hooks.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-02 11:06:32 +00:00
usa
dd4c394564
* include/ruby/win32.h (rb_w32_write_console): wrong prototype.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-29 05:20:08 +00:00
nobu
c6e4767068
* include/ruby/io.h (rb_io_buffer_t): extract from rb_io_t.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-18 13:58:47 +00:00
nobu
8a7aad9952
* fix type warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11 12:30:39 +00:00
nobu
fe9f1e8cf8
* include/ruby/ruby.h (PRI_LL_PREFIX): format type specifier for
...
LONG_LONG may vary on platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11 11:49:54 +00:00
nobu
b3c7867df7
* error.c (rb_syserr_new): new function to make SystemCallError
...
instance without errno. [EXPERIMENTAL]
* error.c (rb_syserr_fail, rb_mod_syserr_fail): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-08 22:30:20 +00:00
naruse
64bd18c588
* include/ruby/oniguruma.h (ONIGENC_CTYPE_SPECIAL_MASK):
...
change mask from 128 to 256. [ruby-core:32931]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-28 11:07:25 +00:00
usa
6ef1aa7964
* include/ruby/ruby.h (NUM2LONG_internal): add cast to get rid of a
...
non GCC compiler warning. this is intentional type conversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-27 03:00:26 +00:00
mame
2285a8d813
* class.c, gc.c, object.c, variable.c, vm_insnhelper.c,
...
include/ruby/ruby.h: separate RCLASS_CONST_TBL from RCLASS_IV_TBL.
RCLASS_IV_TBL has contained not only instance variable table but
also constant table. Now the two table are separated to
RCLASS_CONST_TBL and RCLASS_IV_TBL. This is a preparation for
private constant (see [ruby-dev:39685][ruby-core:32698]).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-26 17:27:21 +00:00
nobu
58d3597e74
* include/ruby/intern.h (rb_check_frozen): optimize.
...
[ruby-core:32878]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-24 08:05:55 +00:00
nobu
8a4966d133
* include/ruby/ruby.h (VALUE): prefer long over uintptr_t,
...
FIX2LONG expects VALUE to be long at least.
* include/ruby/ruby.h (FIX2LONG): parenthesize the argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-15 13:47:38 +00:00
nobu
5ba5d4c889
* include/ruby/ruby.h (ruby_executable_node): missing prototype.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 01:52:54 +00:00
nobu
cea3919ae6
* configure.in (RUBY_CHECK_PRINTF_PREFIX): check for printf format
...
specifier if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 15:03:51 +00:00
naruse
e960fffda1
* numeric.c (rb_enc_uint_chr): split from int_chr.
...
* numeric.c (int_chr): use rb_enc_uint_chr.
* include/ruby/encoding.h (rb_enc_uint_chr): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 06:18:08 +00:00
nobu
6329215dbf
* include/ruby/intern.h (rb_set_kcode, rb_get_kcode): removed
...
zombie prototype declarations. a patch from Eric Hodel
at [ruby-core:32305].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-11 03:32:08 +00:00
naruse
493f721854
* random.c (rb_genrand_ulong_limited): renamed from
...
rb_rand_internal and now this is public API.
* include/ruby/ruby.h (rb_genrand_ulong_limited): added.
* bignum.c (big_sparse_p): use rb_genrand_ulong_limited.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-10 05:44:54 +00:00
nobu
89339af9c1
* include/ruby/version.h (RUBY_API_VERSION_*): renamed and moved
...
from version.h. [ruby-dev:42103]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23 21:08:19 +00:00
akr
b25bda4547
* include/ruby/ruby.h (UINT2NUM): fix ifdef condition for LLP64.
...
reported by Daniel Gutmanas. [ruby-core:31778]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-22 00:10:06 +00:00
nobu
f214490d90
* thread.c (rb_gc_mark_threads): deprecated.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 12:04:31 +00:00
nobu
dccf9e0c45
* configure.in, include/ruby/defines.h (RUBY_FUNC_EXPORTED): macro
...
to declare exported function.
* array.c (rb_ary_memsize), string.c (rb_str_memsize),
variable.c (rb_objspace_data_type_memsize): used in
objspace. [ruby-dev:42022]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 06:33:06 +00:00
nobu
92cb7d0ad4
* include/ruby/intern.h (rb_time_interval): used in io/wait.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 04:23:31 +00:00
nobu
3bf1afbdd8
* include/ruby/intern.h (rb_make_backtrace, rb_make_exception):
...
used in ripper.
* node.h (rb_parser_{malloc,realloc,calloc,free}): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 04:20:59 +00:00
nobu
2b1f8574c7
* include/ruby/encoding.h (rb_char_to_option_kcode): used in
...
ripper.
* node.h (rb_reserved_word): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 20:58:11 +00:00
nobu
574cadc970
* include/ruby/missing.h, include/ruby/ruby.h (namespace ruby):
...
get rid of name clash on C++.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 23:55:49 +00:00
akr
d82dd262d0
* include/ruby/subst.h (snprintf): redefinition moved from ruby.h.
...
(vsnprintf): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 22:19:17 +00:00
akr
bb0ef922db
* include/ruby/subst.h: new file for substitute standard functions..
...
* include/ruby/missing.h: don't substitute "close", etc. here.
* include/ruby/ruby.h: include ruby/subst.h at last.
This prevents substituting "close" in unitstd.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 15:44:27 +00:00
nobu
f6404fa6d5
* include/ruby/missing.h: moved BROKEN_CLOSE replacements from
...
include/ruby/ruby.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 08:49:18 +00:00
nobu
b80d5f14df
* hash.c (rb_check_hash_type): added.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-03 12:01:13 +00:00
nobu
933e5e0911
* include/ruby/win32.h: latest x86_64 mingw defines stati64.
...
[ruby-core:27516]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 00:12:51 +00:00
nobu
7ae7ac4aba
* util.c (ruby_add_suffix): fixed a bug returning uninitialized
...
value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-29 22:59:54 +00:00
usa
97bc1a122b
* win32/Makefile.sub (config.h): VC6 or later have stddef.h.
...
* include/ruby/missing.h: need to include stddef.h for size_t.
* include/ruby/missing.h: shouldn't declare as dllimport when building
ruby itself (for Windows).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-28 10:39:33 +00:00
nobu
58f1d31a1d
* defines.h, intern.h, missing.h, ruby.h, st.h, util.h: include
...
config.h and defines.h for autoconf macros.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-27 09:33:55 +00:00
usa
705586b1a1
* include/ruby/missing.h: revert a part of r28727. config.h is expected
...
to include only once, before including defines.h.
including it here breaks some macro definitions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-26 05:10:25 +00:00
naruse
201d99cc5f
* configure.in: define BROKEN_CLOSE on FreeBSD.
...
This fixes build failure on MSVC. [ruby-core:31481]
* include/ruby/ruby.h, include/ruby/missing.h:
use BROKEN_CLOSE for replacing close(2).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-26 03:05:25 +00:00
nobu
85bf9bede4
* configure.in (XCFLAGS): reverted mistakenly removed option.
...
[ruby-dev:41872]
* include/ruby/missing.h: needs ruby/config.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-23 00:00:12 +00:00
naruse
24b17a2e87
* include/ruby/missing.h: add prototype for ruby_close().
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-22 05:41:54 +00:00
nobu
062b4d6752
* include/ruby/{intern,io}.h: add missing prototypes.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-22 03:02:40 +00:00
nobu
0bd71ff354
* configure.in (XCFLAGS): use -fvisibility=hidden if possible.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-21 21:38:25 +00:00
nobu
06e935a126
* include/ruby/ruby.h (RSTRING_GETMEM): new macro to get ptr and
...
len at once.
* string.c (rb_str_cmp, str_eql, rb_str_eql): trivial improvements.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-20 09:39:22 +00:00
nobu
cc6294a73a
* include/ruby/ruby.h (rb_data_type_t): add new feature macros.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-18 20:46:13 +00:00
nobu
25b9eb5e57
* include/ruby/ruby.h (rb_data_type_t): restructured. [ruby-dev:41862]
...
add parent member.
* error.c (rb_typeddata_inherited_p): new function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-18 07:31:54 +00:00
nobu
c04d79f867
* thread.c (rb_thread_wakeup_alive): split from rb_thread_wakeup.
...
merged from r13476. c.f. [ruby-core:31320]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-17 04:04:51 +00:00
mrkn
9d64fe7ed2
* include/ruby/ruby.h (rb_cRandom): added.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-11 10:05:27 +00:00
naruse
8ff0574198
* missing/close.c: ignore ECONNRESET.
...
FreeBSD wrongly sets ECONNRESET on close(2) and
it causes false-negative exceptions. [ruby-dev:41778]
* configure.in: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07 01:29:22 +00:00
nobu
a67f1a9534
* include/ruby/io.h, io.c: reverted r21709.
...
* ruby.c (load_file_internal): nothing to read if EOF reached
while reading shebang. [ruby-core:30910]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-27 14:31:19 +00:00
tarui
12c2e07a3d
* include/ruby/ruby.h (static inline rb_gc_guarded_ptr): prevent
...
RB_GC_GUARD_PTR being removed by optimization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-24 16:11:05 +00:00
akr
b04fa7b8e1
* include/ruby/missing.h (isnan): fix compilation error on OpenBSD.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-11 14:00:35 +00:00
naruse
f39ad4cab2
* include/ruby/encoding.h (rb_filesystem_encindex): defined.
...
* include/ruby/encoding.h (rb_locale_encindex): ditto.
* encoding.c (rb_filesystem_encindex): remove static.
* encoding.c (rb_locale_encindex): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-27 14:47:16 +00:00
nobu
847a785169
* include/ruby/vm.h, include/ruby/encoding.h: add external
...
linkage.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-25 04:26:50 +00:00
nobu
14f7df242f
* include/ruby/ruby.h (CONST_ID_CACHE, rb_intern_const): suppress
...
warnings with -Wconversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-23 07:56:15 +00:00
nobu
c09c6ee579
* configure.in (warnflags): add -pedantic if gcc.
...
* include/ruby/ruby.h (rb_intern): C90 needs nonempty macro
arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-21 08:35:18 +00:00
nobu
e2f2cf425c
* include/ruby/missing.h (signbit): add missing prototype.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-16 02:39:18 +00:00
akr
b6d3c53724
* include/ruby/intern.h (rb_quad_pack): deprecated.
...
(rb_quad_unpack): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-12 14:49:13 +00:00
akr
a00247f57a
* time.c (rb_big_abs_find_minbit): use ffs().
...
* configure.in: check ffs().
* missing/ffs.c: new file.
* include/ruby/missing.h (ffs): declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-12 13:23:20 +00:00
usa
fe0d339c2c
* win32/win32.c, include/ruby/win32.h (rb_w32_has_cancel_io): new
...
function.
* io.c (WAIT_FD_IN_WIN32): check only when it's not cancelable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-10 05:02:44 +00:00
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