tadf
c1f80caa54
* test/ruby/test_{complex,rational}.rb: added tests.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-09 11:57:59 +00:00
tadf
6c81a8e44e
* complex.c (string_to_c_internal): a refactoring.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-09 11:31:26 +00:00
naruse
140e1f0b15
* string.c: Improve documentation for String#start_with? and
...
String#end_with?. fixes #4652
patched by Andrew Grimm <andrew.j.grimm at gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-09 09:35:27 +00:00
mrkn
ca927d60f4
* complex.c (string_to_c_internal): support scientific notation.
...
patched by Tinco Andringa. https://github.com/ruby/ruby/pull/16
[ruby-core:36046][Bug #4655 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-09 04:52:57 +00:00
svn
d3e5a29361
* 2011-05-09
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-09 02:53:59 +00:00
naruse
074818f3b0
* numeric.c (int_ord): remove K&R style.
...
patched by Daehyub Kim. https://github.com/ruby/ruby/pull/17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-09 02:53:55 +00:00
tadf
10c4a861eb
* test/ruby/test_{complex2,complexrational}.rb: use skip.
...
* test/date/*.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 13:18:47 +00:00
tadf
e2ab17e881
never skip
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 12:03:50 +00:00
tadf
6b8bc66e4d
fixed
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 12:01:59 +00:00
tadf
a4ecf14d58
* test/date/*.rb: NEVER SKIP.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 11:56:32 +00:00
tadf
5518dc64cf
* test/date/*.rb: reverted 31432.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 11:38:25 +00:00
tadf
dbe8aba7f9
* test/date/*.rb: reverted 31483.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 11:33:41 +00:00
naruse
bf92aa8b16
Revert r31478.
...
In CRuby's test-all, skip is for something to be fixed.
When some external library is missing, it should silently return;
don't flood the test result with meaningless messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 11:15:23 +00:00
kosaki
19f52b8740
* thread_pthread.c (native_cond_timedwait): add to care EINTR.
...
* thread_pthread.c (thread_timer): remove EINTR check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 10:46:27 +00:00
tadf
0999333732
* lib/time.rb (xmlschema): avoid passing any negative numbers.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 10:08:12 +00:00
tadf
1348dd26b0
* ext/date/date_{parse,strptime}.c: introduced some macros.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 09:41:38 +00:00
kosaki
1816a4a6a9
revert r31474. we cann't call xmalloc under FGLOCK.
...
Thansk, nagachika-san.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 08:52:25 +00:00
tadf
847b461452
* test/date/*.rb: use skip /w messages.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 08:18:10 +00:00
tadf
d54240d35e
* ext/date/lib/date/format.rb (_httpdate): omitted to call zone_to_diff.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 08:06:40 +00:00
tadf
ca5401e481
* ext/date/date_core.c (date_s_test_*): use macros.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 07:58:11 +00:00
kazu
23f2285835
fix a typo
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 04:27:55 +00:00
kosaki
c878761f3b
* thread_pthread.c (add_signal_thread_list): use xmalloc instead
...
of malloc.
* thread_pthread.c (remove_signal_thread_list): use xfree instead
of free.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 01:54:58 +00:00
kosaki
a3fd4cf507
* thread_pthread.c: cleanup signal_thread_list related ifdef.
...
1) we don't have to use #ifdef FOO-PLATFORM directly 2) About
half #ifdef didn't care symbian properly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-08 01:50:36 +00:00
kosaki
f23fa4b011
* test/io/wait/test_io_wait.rb: Linux socketpair(2) only support
...
AF_UNIX, but windows socketpair doesn't support it. we can't
avoid platform check. sigh!
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 20:21:38 +00:00
svn
c9da3d68ba
* 2011-05-08
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 15:17:25 +00:00
kosaki
16846eb90c
* test/io/wait/test_io_wait.rb: use Socket.pair instaed of pipe.
...
Windows can only treat a socket.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 15:17:22 +00:00
kosaki
70e9201610
* test/io/wait/test_io_wait.rb: skip tests if the platform is
...
mswin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 14:57:38 +00:00
nobu
21fcb1c3a1
* test/ruby/test_io.rb (TestIO#test_readpartial_lock),
...
(TestIO#test_read_lock): get rid of GVL fairness problem.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 14:52:54 +00:00
kosaki
76734388a2
* thread.c (rb_fd_zero): remove redundant zero fill.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 13:44:27 +00:00
kosaki
9468e945c8
* thread.c (rb_fd_init): remove volatile qualifier.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 13:40:56 +00:00
kosaki
156ccab796
* thread.c (rb_fd_init_copy): new internal api. It provide efficient
...
copy constructor semantics.
* thread.c (do_select): use rb_fd_init_copy().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 13:36:08 +00:00
kosaki
ddcd5c2939
r31460 is wrong fix. fix it again.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 13:22:12 +00:00
kazu
68417aa5ce
fix typos
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 10:47:23 +00:00
nobu
1bd2c78b05
* thread_pthread.c (USE_MONOTONIC_COND): check the availability
...
more strictly.
* thread_pthread.h (rb_thread_cond_t): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 09:28:43 +00:00
kosaki
562a1a7929
remove debugging code
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 06:22:39 +00:00
kosaki
fa319c5774
fix incorrect native_cond_signal call when deadlock was detected.
...
* thread.c (lock_func): timedwait don't touch cond_waiting and
cond_notifid variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 06:20:39 +00:00
kosaki
94e4d61bda
fix win32 native_cond_timedwait() makes SIGSEGV.
...
* thread_win32.h (rb_thread_cond_struct): add prev field instead of last.
(ie cond_event_entry is now using double linked list instead of single)
* thread_win32.c (cond_event_entry): add prev field.
* thread_win32.c (__cond_timedwait): remove entry properly if timeout
was happen.
* thread_win32.c (native_cond_signal): change for double linked list.
* thread_win32.c (native_cond_broadcast): ditto.
* thread_win32.c (native_cond_initialize): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 06:17:59 +00:00
kosaki
471fb33b1a
fix mutex deadlock test hang-up.
...
* thread_win32.c (abs_timespec_to_timeout_ms): fix 1000x calculation
mistake. (ie fix hang-up native_cond_timedwait())
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 03:43:27 +00:00
kosaki
7ac6b706b4
sleep_cond use monotonic time if possible.
...
* thread_pthread.c (native_thread_init): change sleep_cond
attribute to monotonic.
* thread_pthread.c (native_sleep): use native_cond_timeout().
* thread_pthread.c (native_cond_timeout): add overflow care.
* thread_win32.c (native_cond_timeout): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06 18:17:14 +00:00
akr
2d7a5f6553
update doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06 18:14:25 +00:00
kosaki
604a1e2e22
fix win32 compile error.
...
* thread_win32.c (RB_CONDATTR_CLOCK_MONOTONIC): define
RB_CONDATTR_CLOCK_MONOTONIC always.
* thread_pthread.c (RB_CONDATTR_CLOCK_MONOTONIC): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06 17:50:23 +00:00
kosaki
b2ea836ae7
mutex: deadlock check timeout use monotonic time.
...
* thread_pthread.c (native_cond_timeout): new internal api.
it calculate a proper time for argument of native_cond_timedwait().
* thread_win32.c (native_cond_timeout): ditto.
* thread_pthread.c (thread_timer): use native_cond_timeout()
instead of get_ts.
* thread.c (lock_func): ditto.
* thread_pthread.c (get_ts): removed. use native_cond_timeout().
* thread.c (init_lock_timeout): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06 17:39:32 +00:00
kosaki
54b50fbb9c
* thread_pthread.c (get_ts): add monotonic clock capability.
...
* thread_pthread.c (rb_thread_create_timer_thread): use monotonic
clock if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06 16:56:06 +00:00
svn
17707b2d48
* 2011-05-07
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06 16:47:44 +00:00
kosaki
a1cfaf4b1f
* thread_pthread.h (rb_thread_cond_t): add clockid field. it's
...
no longer an alias of pthread_cond_t.
* thread_pthread.c: adapt new rb_thread_cond_t type.
* thread.c (mutex_alloc): ditto.
* thread_win32.c (native_cond_initialize): ditto.
* configure.in: add check for pthread_cond_attr_setclock() and
clockid_t type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06 16:47:38 +00:00
kosaki
4a9883e92f
* thread.c (rb_wait_for_single_fd): use ppoll() instead of poll()
...
if possible. based on a patch from Eric Wong. [ruby-core:36003].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06 14:58:38 +00:00
kosaki
066eecf53a
* configure.in: remove nanosleep check. we no longer use it.
...
r20124 removed last usage.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06 14:18:06 +00:00
nobu
31ae13c9c1
set properties.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06 14:02:10 +00:00
nobu
54aa0b1232
* ext/syck/rubyext.c (mktime_do): extra digits are not used.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06 13:36:02 +00:00
naruse
957ec6fcc8
* ext/syck/rubyext.c (mktime_do): remove unused variable offset.
...
* ext/syck/syck.h: use #ifdef instead of #if DEBUG.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-06 08:44:07 +00:00