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

14627 Коммитов

Автор SHA1 Сообщение Дата
akr d06a6b22f5 * strftime.c (rb_strftime_with_timespec): fix precision handling for
%:z and %::z.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-10 12:43:54 +00:00
akr e51e679f14 * strftime.c: unused declarations removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-09 13:33:39 +00:00
akr 85f10041b2 * strftime.c (rb_strftime_with_timespec): clear colons at unknown
directive.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-09 12:21:26 +00:00
akr 6f1c1b496e * strftime.c: don't call tzset. strftime.c doesn't depend on
the global timezone.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-09 12:04:26 +00:00
akr 00f97ed41a * time.c (find_time_t): 24:00 should be the beginning of the next
day even if the leap second, 23:59:60, exists.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-09 11:33:46 +00:00
tenderlove a5dec23045 * ext/psych/lib/psych/visitors/emitter.rb (initialize): line_width is
a valid option passed to the emitter.
* test/psych/test_psych.rb: corresponding tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-08 16:10:10 +00:00
tenderlove ba9a959a18 * ext/psych/emitter.c (line_width, set_line_width): preferred line may
be set on the emitter.
* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
* test/psych/test_emitter.rb: corresponding tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-08 16:02:26 +00:00
naruse 3a6fd339d5 * string.c (rb_str_conv_enc_opts): fix infinite loop because
of ISO-2022-JP conversion with empty string.
  patched by Brian Buchanan [ruby-core:31107]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-08 08:18:07 +00:00
tenderlove 646b699536 * ext/psych/lib/psych/visitors/yaml_tree.rb (push): adding version
and header emit options.
* test/psych/test_psych.rb: corresponding test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07 23:18:27 +00:00
tenderlove 3a185ede69 * ext/psych/lib/psych/visitors/emitter.rb: sending emit options to
YAML emitter. [ruby-core:28318]
* ext/psych/emitter.c: updating documentation about emit options
* ext/psych/lib/psych/core_ext.rb: ditto
* ext/psych/lib/psych.rb (dump): passing emit options to emitter.
* ext/psych/lib/psych/nodes/node.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07 23:05:45 +00:00
akr a5d37d10a9 * strftime.c (rb_strftime_with_timespec): support %:z and %::z.
[ruby-dev:41841]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07 21:07:01 +00:00
mame d1de97e0bc * gem_prelude.rb: provide workaround for gem activation. Currently,
gem activation does not work by default.  Now it can be worked
  around by requiring "rubygems" first.  [ruby-core:29486]
  a patch from Evan Phoenix in [ruby-core:31096].

* lib/rubygems.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07 15:40:52 +00:00
shyouhei ce9c952937 Merge branch 'mybranch' of git://github.com/orangea/ruby into trunk
Conflicts:
	ChangeLog

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07 10:59:44 +00:00
usa 09e1383bcf * file.c (ruby_find_basename): set correct baselen.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07 04:22:30 +00:00
knu 42f4a548f0 * vm_method.c (rb_method_boundp): respond_to?(:protected_method,
true) should return true.  Pointed out by Marc-Andre Lafortune.
  [ruby-dev:41837]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07 04:06:32 +00:00
usa 2520f3f79c * file.c (ruby_find_basename): should initialize f.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07 03:03:19 +00:00
nobu 01e1a0ac78 * ext/zlib/zlib.c (gzfile_raise): add invalid header to
exceptions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07 02:44:04 +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
akr 5bf4c6a635 * io.c (nogvl_copy_stream_sendfile): jump to retry_sendfile directly
to avoid select() on a socket which TCP state is CLOSED.
  patch by Eric Wong.  [ruby-core:31053]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-06 13:59:12 +00:00
usa 80b9fb5a7b * io/console/console.c (winsize_row): should return actual screen
size, not buffer size.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-06 12:47:18 +00:00
tenderlove ff10d93563 * ext/dl/lib/dl/import.rb (handler): add a more helpful error message
when calling import_symbol or import_function without calling
  dlload.  Thanks nobu! [ruby-core:30996]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-05 23:38:35 +00:00
mame 68ab3ede30 * vm.c (thread_free): free altstack to prevent memory leak. a patch
from Tomoyuki Chikanaga in [ruby-dev:41815]. [Bug #3537]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-05 15:57:20 +00:00
mame 4f7b82475a * string.c (NONASCII_MASK): NONASCII_MASK must be unsigned.
[ruby-dev:41782]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-05 15:32:35 +00:00
knu 78a78b45d6 * vm_method.c (rb_method_boundp): Return false for protected
methods when called from Kernel#respond_to?. [ruby-dev:40461]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-05 07:11:44 +00:00
tenderlove ce2e7368d7 * ext/psych/lib/psych/scalar_scanner.rb (parse_string): support
timezones that are not one hour off. [ruby-core:31023]
* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-05 03:33:56 +00:00
akr 9f56a870af * test/ruby/test_syntax.rb: split test_syntax from test_system.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-04 13:50:34 +00:00
akr c5de4d4cbd * test/ruby/test_system.rb (test_syntax): unified with test_syntax2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-04 13:03:04 +00:00
akr 16923c25a1 * test/ruby/test_system.rb (test_syntax2): moved from sample/test.rb
[ruby-dev:41721]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-04 12:01:46 +00:00
nobu 6fb59decd0 * io.c (swallow, prepare_getline_args, rb_io_getline_1): fix for
paragraph mode reading in non-ascii-compatible encoding.
  [ruby-dev:41803]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-04 08:13:15 +00:00
mrkn 1c3e07f0d6 * ext/bigdecimal/bigdecimal.c (Init_bigdecimal): add two new constants BigDecimal::INFINITY and BigDecimal::NAN.
* ext/bigdecimal/lib/bigdecimal/math.rb (BigMath.exp): modify the behaviors for infinity arguments as same as Math.exp.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-03 07:47:00 +00:00
tenderlove 59cad45f99 * ext/psych/lib/psych/visitors/to_ruby.rb(visit_Psych_Nodes_Scalar):
teaching Psych to deserialize DateTime objects. [Bug #1390]

* ext/psych/lib/psych/visitors/yaml_tree.rb(visit_DateTime): added a
  method for serializing DateTime objects.

* ext/psych/lib/psych/scalar_scanner.rb(parse_time): add method for
  parsing times objects from a string.

* test/psych/test_date_time.rb: tests for dumping DateTime objects.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-03 00:52:43 +00:00
tenderlove 6fe92a3cd6 * ext/psych/lib/psych/visitors/yaml_tree.rb (visit_Time): use
Time#nsec to accurately serialize time objects. [ruby-core:29233]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-03 00:15:51 +00:00
usa 09ee12bb20 * io.c (argf_inplace_mode_set): prohibits an assignment of a tainted
value.

* file.c (ruby_find_basename, ruby_find_extname): split from
  rb_file_s_basename() and rb_file_s_extname().

* util.c (ruby_add_suffix): support arbitrary length of the suffix
  to get rid of the potential buffer overflow.
  reported by tarui.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-02 14:31:26 +00:00
akr 26202fba93 * numeric.c (rb_num2long): accept LONG_MAX < x < LONG_MAX+1 and
LONG_MIN-1 < x < LONG_MIN as well because they are converted
  into the valid range of long by truncation.
  (rb_num2ulong): accept ULONG_MAX < x < ULONG_MAX+1 and
  LONG_MIN-1 < x < LONG_MIN as well.
  (rb_num2ll): accept LLONG_MAX < x < LLONG_MAX+1 and
  LLONG_MIN-1 < x < LLONG_MIN.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-01 20:39:32 +00:00
jeg2 5d229db887 * lib/csv.rb: Improving documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-01 14:11:02 +00:00
akr 8bab1aff2c * numeric.c (rb_num2ulong): fix the lower limit for float.
[ruby-dev:41361]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-01 13:34:13 +00:00
nobu e12c43ee8c * ChangeLog: revert deleted logs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-01 13:09:04 +00:00
nobu 57ba9de9e0 * test/ruby/envutil.rb (EnvUtil#invoke_ruby): integrated with
runexec.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-01 12:37:58 +00:00
naruse 6957c6d9cf * thread_pthread.c (thread_start_func_1): don't call
native_thread_init_stack(th) on cygwin to avoid the segv
  introduced by r27789. Cygwin's signal implementation is half
  baked so USE_SIGNALSTACK is not defined and it needs another
  treatment.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-01 07:25:20 +00:00
nobu 678f6b3716 * common.mk (test-knownbug): ignore known bugs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-01 04:00:56 +00:00
nobu 12b0ccc204 * marshal.c (w_object): suppress empty instance variable entry on
compatible dump objects.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-30 23:40:37 +00:00
nobu 1f7eb6e7ae * test/ruby/test_rubyoptions.rb (test_script_from_stdin): by using
a pipe, get rid of not-well-defined behavior after the child
  process terminated in pty.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-29 22:29:12 +00:00
kanemoto 78d48a330d * thread_pthread.c (get_stack): use pthread_getthrds_np() for AIX.
* configure.in: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-29 17:29:27 +00:00
tarui a9ffa5cecf * ChangeLog: remove an extra newline.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-29 12:20:52 +00:00
tarui 952b1bf355 * ext/stringio/stringio.c (strio_write): add RB_GC_GUARD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-29 12:12:07 +00:00
suke 835da2f07b * test/win32ole/test_win32ole_method.rb (is_ruby64): check
ruby binary is mswin64 or mingw64. [ruby-dev:41756]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-29 10:49:38 +00:00
usa e2f4729d42 * file.c (rb_realpath_internal, realpath_rec): skip UNC share root
on DOSISH platforms.
  http://pc12.2ch.net/test/read.cgi/tech/1272248179/600


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-29 05:20:06 +00:00
nari 12b76ec890 * gc.c (unlink_heap_slot, slot_sweep): unlink heaps_slot of
heaps_slot linked list if heaps_slot is empty at slot_sweep.
  fixed [ruby-dev:41543], [ruby-core:24894].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-29 03:11:05 +00:00
tenderlove 50bb2544bb * ext/fiddle/fiddle.h: added FFI type detection to avoid bug in ffi
header files. Thanks Yugui! [ruby-core:30917]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-28 16:26:59 +00:00
mame 5b5c6378c7 * test/rdoc/test_rdoc_ri_driver.rb (TestRDocRIDriver#test_formatter):
fix a test accordingly to r28455.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-28 13:16:17 +00:00