akr
0dc9be63a5
* re.c (rb_reg_fixed_encoding_p): extracted from rb_reg_prepare_re and
...
rb_reg_s_union.
(rb_reg_s_union): refactored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-26 02:27:59 +00:00
nobu
cf74bde83c
* io.c (rb_read_internal, rb_sysopen_internal): remove C99 dependency.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-26 01:44:23 +00:00
matz
691df99d6a
* test/ruby/test_eval.rb (TestEval::test_instance_eval_cvar):
...
updated not to modify class variable of Object class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-26 01:31:20 +00:00
nobu
e42d6b8862
* bootstraptest/test_{io,marshal}.rb, lib/rubygems/require_paths_builder.rb test/ruby/test_m17n.rb: set properties.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-26 01:20:48 +00:00
matz
f7bd951bea
* variable.c (rb_f_global_variables): variable names should not
...
duplicate. [ruby-dev:32344]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-26 01:17:17 +00:00
akr
b2e60b2ce7
* include/ruby/encoding.h (rb_enc_str_asciionly_p): declared.
...
(rb_enc_str_asciicompat_p): defined.
* re.c (rb_reg_initialize_str): use rb_enc_str_asciionly_p.
(rb_reg_quote): return ascii-8bit string if the argument is
ascii-only to generate encoding generic regexp if possible.
(rb_reg_s_union): fix encoding handling. [ruby-dev:32094]
* string.c (rb_enc_str_asciionly_p): defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-25 13:25:34 +00:00
akr
43090c9f50
test_to_s refined.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-25 07:47:51 +00:00
drbrain
369697bceb
Import fast-loading gem_prelude.rb from RubyGems.
...
Import RubyGems r1516.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-25 03:26:36 +00:00
akr
f90fdbfc73
add more roundtrip tests.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-25 00:38:33 +00:00
akr
07ba43734d
add test for printf format %x, %o and %b.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-24 16:32:10 +00:00
akr
1d8519ad86
add a test for [ruby-dev:32351].
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-24 16:08:10 +00:00
ko1
c4c151bed8
* io.c: add rb_read_internal() as blocking function.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23 08:35:29 +00:00
ko1
2a2e4bbbc3
* vm.c: fix comment.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23 08:34:34 +00:00
ko1
1e4278c98d
* bootstraptest/test_knownbug.rb: move solved tests.
...
* bootstraptest/test_io.rb, test_marshal.rb, test_objectspace.rb:
ditto.
* test/ruby/test_integer.rb, test_regexp.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23 08:33:32 +00:00
akr
e265a55740
fix va_start arg.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23 07:15:17 +00:00
akr
0d89567252
* struct.c (rb_struct_alloc_noinit): new function.
...
(rb_struct_define_without_accessor): add allocator to the arguments.
* range.c (range_alloc): re-introduced using rb_struct_alloc_noinit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23 07:00:50 +00:00
akr
2109a52503
* re.c (REG_CASESTATE): unused macro removed.
...
(rb_reg_prepare_re): check encoding difference.
(rb_reg_initialize): check 8bit byte.
* parse.y (parser_tokadd_escape): fix has8bit.
[ruby-dev:32113]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23 06:30:26 +00:00
akr
f1afb3959c
add ML ref.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23 04:51:02 +00:00
akr
0dbdad7599
* struct.c (rb_struct_define_without_accessor): new function.
...
* range.c (range_alloc): removed.
(Init_Range): use rb_struct_define_without_accessor.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23 04:35:53 +00:00
matz
d73f08d56d
* re.c (match_begin): should return offset by character.
...
[ruby-dev:32331]
* re.c (match_end): ditto.
* re.c (rb_reg_search): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23 02:10:44 +00:00
matz
050a10c607
* compile.c (defined_expr): defined(method(x)) dumped core. a
...
patch from Yusuke ENDOH <mame AT tsg.ne.jp>. [ruby-dev:32335]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23 01:46:44 +00:00
akr
cca64ecb9a
previous change refined.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-22 01:36:13 +00:00
akr
6ed29c55ef
add test for [ruby-dev:32329].
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-22 01:32:32 +00:00
matz
c227d3feb3
* insnhelper.ci (vm_search_normal_superclass): rename function.
...
* insnhelper.ci (vm_search_superclass): ditto.
* proc.c (struct METHOD): rename rklass -> rclass.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-22 01:17:52 +00:00
ko1
c79ab68d37
* vm.c: fix to recycle thread data (VM stack).
...
* thread.c: ditto.
* benchmark/bm_vm3_thread_create_join.rb: add loop count.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-21 09:06:06 +00:00
ko1
58b1f91b46
* benchmark/driver.rb: add path to trunk/lib if driver runner is
...
in build directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-21 09:03:52 +00:00
akr
a5c4480732
* test/fileutils/fileasserts.rb (assert_equal_timestamp): new assert
...
to test tv_sec only for filestamp resolution portability.
(assert_same_entry): use assert_same_entry for mtime comparison.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-21 07:40:36 +00:00
ko1
53b3bf961c
* array.c (rb_ary_permutation): add gc guard codes.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-21 06:06:10 +00:00
matz
d154b1c346
* process.c (rb_f_system): returns nil on execution failure.
...
[ruby-core:13715]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 18:21:39 +00:00
matz
7da723cfbb
* object.c (nil_plus): remove unused function. [ruby-core:13737]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 16:16:53 +00:00
akr
43e55c6bc4
* time.c (time_mload): ignore invalid digits in submicro.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 12:50:29 +00:00
ko1
01dacec2b4
* include/ruby/ruby.h: rename RFloat#double_value -> float_value.
...
* numeric.c, parse.y: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 11:35:12 +00:00
akr
9ea27a0b53
update doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 10:55:22 +00:00
ko1
3453b2bd0e
* gc.h, vm_core.h: decl of rb_gc_save_machine_context()
...
should be at vm_core.h.
* include/ruby/ruby.h, intern.h: remove type rb_thread_t.
* include/ruby/intern.h: change rb_unblock_function_t,
rb_unblock_function_t.
* file.c, process.c: apply above changes.
* thread.c, thread_pthread.ci, thread_win32.ci: ditto.
* io.c: support blocking open (2). [ruby-core:13614]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 10:47:53 +00:00
akr
d481323b92
* io.c (rb_io_close_on_exec_p): new method IO#close_on_exec?.
...
(rb_io_set_close_on_exec): new method IO#close_on_exec=.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 08:12:34 +00:00
akr
60d0ddc942
* gc.c (gc_mark_children): obj->as.file.fptr may be 0 for T_FILE.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 07:25:07 +00:00
nobu
64ba5303fd
* parse.y (parser_read_escape): has8bit flag may be set with control
...
escape. [ruby-core:13722]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 06:09:03 +00:00
nobu
d7e4c1e66b
* parse.y (parser_prepare): set begging after BOM if exists.
...
[ruby-core:13718]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 06:08:16 +00:00
drbrain
db74541efe
Update to RubyGems 0.9.5
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 05:56:43 +00:00
usa
cae4fb76dc
* include/ruby/win32.h win32/win32.c (rb_w32_pipe_exec): use dual fd
...
instead of socketpair when mode is RDWR.
* io.c (pipe_open): pass &write_fd to rb_w32_pipe_exec().
* io.c (popen_redirect): define only when HAVE_FORK.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 04:04:51 +00:00
akr
0d8ac93f58
* include/ruby/io.h (rb_io_t): add tied_io_for_writing member.
...
* io.c: use tied_io_for_writing for duplex popen.
* gc.c: mark tied_io_for_writing.
* common.mk: gc.o depends io.h.
[ruby-dev:32205]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 03:16:53 +00:00
akr
ee1029cb7f
* test/drb/test_drb.rb: rename TestRubyYield to TestDRbRubyYield to
...
avoid name crash with test/ruby/test_yield.rb.
TestRuby18Yield is renamed to TestDRbRuby18Yield too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 03:01:49 +00:00
seki
6591e38016
merged from ruby_1_8 branch.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 18:30:18 +00:00
akr
44b6b031ba
previous change refined.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 16:19:12 +00:00
akr
b4a0020707
* test/fileutils/fileasserts.rb (assert_equal_time): show nsec if
...
assertion fails but time.to_s equals.
(assert_same_entry): use assert_equal_time.
* test/fileutils/test_fileutils.rb (test_install): use
assert_equal_time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 15:57:52 +00:00
akr
18b46e0c21
update doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 14:40:15 +00:00
akr
b5ccb6b34f
Time#nsec and Time#tv_nsec described.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 10:55:39 +00:00
akr
63a297994b
* file.c (utime_internal): fallback utimensat to utimes.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 09:48:00 +00:00
akr
81f0bb309e
fix Time.parse to support nsec.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 09:24:28 +00:00
akr
a070c4fbe3
* configure.in: check struct timespec, clock_gettime, utimensat,
...
struct stat.st_atim,
struct stat.st_atimespec,
struct stat.st_atimensec,
struct stat.st_mtim,
struct stat.st_mtimespec,
struct stat.st_mtimensec,
struct stat.st_ctim,
struct stat.st_ctimespec,
struct stat.st_ctimensec.
* include/ruby/missing.h: provide struct timespec if not available.
* time.c: support nanosecond-resolution using struct timespec.
* include/ruby/intern.h: provide rb_time_nano_new.
* file.c (utime_internal): use utimensat if available.
(rb_file_s_utime): refactored.
(rb_f_test): use stat_atime, stat_mtime, stat_ctime.
(rb_stat_cmp): check tv_nsec.
(stat_atimespec): new function.
(stat_atime): ditto.
(stat_mtimespec): ditto.
(stat_mtime): ditto.
(stat_ctimespec): ditto.
(stat_ctime): ditto.
(rb_stat_atime): use stat_atime.
(rb_file_s_atime): ditto.
(rb_file_atime): ditto.
(rb_stat_mtime): use stat_mtime.
(rb_file_s_mtime): ditto.
(rb_file_mtime): ditto.
(rb_file_ctime): use stat_ctime.
(rb_file_s_ctime): ditto.
(rb_stat_ctime): ditto.
* variable.c (rb_copy_generic_ivar): clear clone's instance variables
if obj has no instance variable.
* marshal.c (w_object): dump instance variables of generated string
for TYPE_USERDEF, even if original object has instance variables.
* lib/time.rb (Time#xmlschema): use nsec instead of usec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 09:09:38 +00:00