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

10182 Коммитов

Автор SHA1 Сообщение Дата
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
matz a2946d85ec * object.c (rb_class_superclass): should not raise exception for
BasicObject.  [ruby-Bugs-15668]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 08:49:42 +00:00
matz 7a978073c9 * parse.y (parser_yylex): should clear parser->tokp as well.
[ruby-dev:32250]

* parse.y: remove NEED_ASSOC that break test_parser_events.

* parse.y (parser_yylex): should not decrement line numbers at the
  end of file.

* file.c (rb_find_file_ext): search .rb files first through in the
  loadpath.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 07:10:09 +00:00
matz 03c4e447fa * array.c (rb_ary_permutation): gives all permutations of elements
if no argument given.  a patch from Yusuke ENDOH <mame AT tsg.ne.jp>.
  [ruby-dev:32309]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 07:06:03 +00:00
nobu 126bd20141 * compile.c (iseq_compile_each): alias and undef accept dsyms as well
as literals.  [ruby-dev:32308]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18 17:44:09 +00:00
nobu 9cef6acdc7 * eval_method.ci (rb_add_method): no redefinition warning for undef.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18 17:31:39 +00:00
nobu 9417595993 * parse.y (parser_read_escape): disallow control and meta modifiers
for non-ASCII characters.  [ruby-core:13685]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18 16:53:12 +00:00
akr 30e97cbb8b * marshal.c (mark_dump_arg): it may be called after dump_ensure.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18 11:50:25 +00:00
akr 3184ac2dfe * time.c (time_minus): fix Time.at(2**60+1) - Time.at(2**60).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18 09:30:17 +00:00
akr 1e3ca9807b * time.c (time_arg): show actual year in 2-3 digits year warning.
(time_mdump): show actual year in "year too big to marshal" error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18 08:30:26 +00:00
akr 68543f3092 use ML ref. for assertion message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18 07:18:56 +00:00
nobu c719cd9b46 * eval_method.ci (rb_alias): do not call hook functions until
initialization finishes.  [ruby-talk:279538]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18 05:03:46 +00:00
nobu 16dc06014c * lib/mkmf.rb (String#tr_cpp): make preprocessor identifiers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18 00:09:50 +00:00
akr 5c19fbacec check class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-17 20:25:27 +00:00
akr aa7ce1ece1 * lib/mkmf.rb (have_struct_member): define HAVE_type_member.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-17 20:20:44 +00:00
suke 24dcd39f19 ext/win32ole/win32ole.c (ole_invoke): bug fix. [ruby-talk:279100]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-17 15:04:55 +00:00
matz 4bd57e3311 * bignum.c (rb_big_odd_p): new method added. a patch from Tadashi
Saito <shiba AT mail2.accsnet.ne.jp>.  [ruby-dev:32305]

* bignum.c (rb_big_even_p): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-16 14:41:11 +00:00
nobu 0d95854a52 * ext/iconv/iconv.c (iconv_iconv): also instance method needs to be
qualified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-16 08:41:37 +00:00
nobu 85b72a85b5 * ext/iconv/iconv.c (Document-class): moved the simplest example to
the top.

* ext/iconv/iconv.c (iconv_s_iconv): Document-method: needs class
  prefix for class method.  [ruby-core:13542]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-16 08:03:36 +00:00
shugo 731aa0d0a8 * include/ruby/ruby.h: added some declarations for event hooks.
* lib/profile.rb: set VM::InstructionSequence.compile_option.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-16 07:29:44 +00:00
nobu fd0ab68415 * lib/yaml/rubytypes.rb (String#is_binary_data?): use Integer#fdiv.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-16 02:16:43 +00:00
nobu 75feee0968 * set eol-style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-16 01:30:29 +00:00
akr 501407d3af add largefile.h, miniprelude.c,
ext/fiber/extconf.h, ext/fiber/Makefile,
ext/continuation/extconf.h, ext/continuation/Makefile for svn:ignore.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 22:47:47 +00:00
why c0978692df * ext/syck/rubyext.c: Node#value defined twice.
* lib/yaml/: several method redefinitions causing warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 18:36:51 +00:00
why 91e0600535 * lib/yaml/types.rb: Likewise, pass self to YAML::quick_emit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 18:03:26 +00:00
why 2fb73a8b0a * lib/yaml.rb (quick_emit): use combination of object_id and hash to
identify repeated object references, since GC will reuse memory of
	objects during output of YAML. [ruby-Bugs-8548] [ruby-Bugs-3698]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 17:54:32 +00:00
usa 808becf9e0 * ChangeLog: add ML ref.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 10:52:21 +00:00
usa 0595aef18e * ext/curses/extconf.rb: check macro if cannot find func.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 10:50:34 +00:00
akr 7d6eb8e68b * tool/compile_prelude.rb: fix TMP_RUBY_PREFIX for relative load path
environment.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 09:07:45 +00:00
akr 790f631301 escape "{" too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 08:33:10 +00:00
akr 479c06d19d * tool/compile_prelude.rb: absolute path may not start with a slash.
pointed by usa.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 08:30:07 +00:00
akr f1bc46f06d * tool/compile_prelude.rb: fix first substitution.
use constant for prefix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 08:08:40 +00:00
nobu dc6e570665 * common.mk (prereq): added auto generated sources. [ruby-dev:32280]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 05:29:58 +00:00
akr afb554d90a * tool/compile_prelude.rb: use constant for prefix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 03:32:26 +00:00
akr 3b37c74564 * tool/compile_prelude.rb: use simple template system for source
code generation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 03:26:20 +00:00