naruse
59f551635a
* ext/readline/readline.c (readline_s_get_line_buffer):
...
Readline.line_buffer should return locale string.
[ruby-dev:42184] #3791
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-06 01:38:51 +00:00
naruse
a69423beb8
* util.c (ruby_strtod): check there is at least 1 digit after
...
"0x" before ".". [ruby-dev:42183] #3790
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-06 01:00:29 +00:00
naruse
0ed5aee000
* util.c (ruby_strtod): check integr overflow.
...
[ruby-dev:42180] #3789
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-06 00:46:48 +00:00
nobu
0fd37b09ee
* file.c (rb_file_s_readlink): symlink target should be in
...
filesystem encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-04 14:48:55 +00:00
nobu
185e9705ab
* ext/pty/pty.c (chfunc): restore errno from SystemCallError and
...
propagate proper exception to the parent. [ruby-dev:41965]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-02 21:14:51 +00:00
ryan
ee9e8f82d4
Imported minitest 1.7.1 r5835
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-01 08:40:53 +00:00
naruse
09fb7189ec
* string.c (tr_setup_table): optimized. don't create hash objects
...
when given pattern is ASCII only.
* string.c (tr_find): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-01 07:52:16 +00:00
nobu
8086b525ac
* thread.c (ruby_suppress_tracing): restore the state and invoke
...
the func with normal state. a patch from Satoshi Shiba <shiba
AT rvm.jp> at [ruby-dev:42162]. [ruby-core:31783]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-01 03:56:39 +00:00
naruse
d074ef4d60
* string.c (tr_setup_table): fix bug in r29146.
...
Initialize table even if cflag is 0; tr_find see whether
del is empty or not.
* string.c (tr_find): nodel can't be NULL; if NULL, it means
it is not specified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-30 19:45:30 +00:00
naruse
1a02ec9170
* string.c (tr_setup_table): initialize negating table when
...
negating string is given. [ruby-core:31851]
* string.c (tr_find): add a sentence for the time when
target characters include negating one.
* string.c (rb_str_count): move definition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-30 06:01:14 +00:00
nobu
ccf4fbf78d
* lib/rdoc/parser/ruby.rb (RDoc#parse_class): ignore non-constant
...
name signleton class. [Bug #3759 ], [ruby-dev:42154]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-29 14:47:01 +00:00
nobu
d2da9597c3
* file.c (rb_get_path_check): clarify error message for
...
ASCII-incompatible path name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-29 14:25:23 +00:00
nobu
e6f86c982f
* vm.c (rb_thread_method_id_and_class): curried proc has no
...
method. [ruby-core:31871]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-29 04:22:55 +00:00
nobu
b9432e7630
* load.c (rb_provide_feature): clarify error message for frozen
...
$LOADED_FEATURES. based on a patch from Run Paint Run Run at
[ruby-core:31913].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-29 03:51:39 +00:00
nobu
946a037e30
* load.c (load_failed): should honor encoding. [ruby-core:31915]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-29 03:20:04 +00:00
usa
909d638aec
* test/pathname/test_pathname.rb (test_expand_path): should treat drive letter.
...
* test/pathname/test_pathnamr.rb (test_grpowned?): group onwer is not suppoted
on DOSISH platforms.
* test/pathname/test_pathnamr.rb (test_world_readable?, test_sticky?,
test_world_writable?): skip some tests on the assumptions for Unix on
DOSISH.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-29 00:50:58 +00:00
mrkn
a2bf9203e8
* ext/bigdecimal/bigdecimal.c (BigDecimal_save_exception_mode,
...
BigDecimal_save_rounding_mode, BigDecimal_save_limit): added.
* test/bigdecimal/test_bigdecimal.rb: added tests for the above
features.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-28 08:52:14 +00:00
shyouhei
cff3c3d52a
* string.c (rb_str_prepend): new method by Sora Harakami
...
[Feature #3765 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-27 07:33:19 +00:00
mrkn
9be503f332
* math.c (math_atan2): change the behavior when x and y are zero.
...
* test/ruby/test_math.rb (test_atan2): add tests for the above
changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-27 03:51:56 +00:00
nobu
5b7ccc0629
* array.c (rb_ary_shuffle_bang): bail out from modification during
...
shuffle.
* array.c (rb_ary_sample): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-26 22:57:39 +00:00
kanemoto
6ef6cbc4f6
Creating dummy library for dl/fiddle tests on AIX.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-26 01:16:53 +00:00
nobu
7e4015e16d
* array.c (rb_ary_shuffle_bang): check number of argument.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-26 00:49:54 +00:00
mrkn
3dc6edf793
* ext/bigdecimal/bigdecimal.c (Init_bigdecimal, rmpd_set_thread_local_exception_mode, VpGetException, VpSetException): thread-local exception mode.
...
* ext/bigdecimal/bigdecimal.c (Init_bigdecimal, rmpd_set_thread_local_precision_limit, VpGetPrecLimit, VpSetPrecLimit): thread-local precision limit.
* ext/bigdecimal/bigdecimal.c (Init_bigdecimal, rmpd_set_thread_local_rounding_mode, VpGetRoundMode, VpSetRoundMode, VpException, VpInternalRound): thread-local rounding mode.
* ext/bigdecimal/bigdecimal.c (BigDecimal_mode, BigDecimal_round, VpIsRoundMode, VpGetRoundMode, VpSetRoundMode, VpActiveRound, VpMidRound, VpLeftRound), ext/bigdecimal/bigdecimal.h: use unsigned short for rounding mode.
* test/bigdecimal/test_bigdecimal.rb (test_mode): add test for setting rounding mode.
* test/bigdecimal/test_bigdecimal.rb (test_thread_local_mode): add test for setting mode thread-locally.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-26 00:14:18 +00:00
nobu
8554e16355
* array.c (rb_ary_{shuffle_bang,sample}): use Random class object.
...
* random.c (try_get_rnd): use default_rand for Random as same as
singleton methods.
* random.c (rb_random_real): check the range of result.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-25 22:30:03 +00:00
shyouhei
2531892cbc
reverted to r29091; r29092 breaks test-all
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-25 12:14:38 +00:00
nobu
fd1022c065
* random.c (rb_random_real): check the range of result.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-25 09:31:46 +00:00
nobu
2f6c0e3be3
* array.c (rb_ary_shuffle_bang, rb_ary_sample): add optional
...
argument random. [ruby-dev:41923] [EXPERIMENTAL]
* random.c (rb_random_{int32,real,bytes}): fallback to normal
method invocation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23 22:07:39 +00:00
mrkn
af8cae1e7f
* ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): to_f must underflow when the exponent is less than DBL_MIN_10_EXP - BASE_FIG.
...
* test/bigdecimal/test_bigdecimal.rb (test_to_f): added test for the above changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23 16:22:04 +00:00
akr
526d246f71
* ext/pathname/pathname.c (path_each_line): Pathname#each_line
...
translated from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23 14:16:06 +00:00
nahi
298a6e1cd5
* backport r29071 from ruby_1_8;
...
* ext/openssl/ossl_asn1.c (obj_to_asn1bool): fixed ASN1::Boolean
encoding issue for OpenSSL 1.0.0 compatibility.
ASN1::Boolean.new(false).to_der wrongly generated "\1\1\377" which
means 'true'.
ASN1_TYPE_set of OpenSSL <= 0.9.8 treats value 0x100 as 'false'
but OpenSSL >= 1.0.0 treats it as 'true'. ruby-ossl was using
0x100 for 'false' for backward compatibility. Just use 0x0 for
the case OpenSSL >= OpenSSL 0.9.7.
* test/openssl/test_asn1.rb: test added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23 04:12:08 +00:00
naruse
815ab02971
* util.c (ruby_strtod): make sure to have digit-sequence after 'p'
...
for hexadecimal-floating-constant. [ruby-dev:42105]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23 03:19:58 +00:00
tadf
9d2025c881
* lib/date.rb, lib/date/format.rb: [ruby-core:31695]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-22 15:24:03 +00:00
wanabe
df5f6825db
* test/ruby/test_super.rb: add test.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-21 14:38:17 +00:00
akr
19fb560d21
* ext/pathname/pathname.c (path_expand_path): Pathname#expand_path
...
translated from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-20 01:40:51 +00:00
nahi
15c39b07bd
* backport r28621 and r28632 from ruby_1_8;
...
* ext/openssl/ossl_config.c, ext/openssl/lib/openssl/config.rb,
ext/openssl/lib/openssl.rb: reimplement OpenSSL::Config in Ruby.
Now it should work on windows.
* test/openssl/test_config.rb: added tests for OpenSSL::Config#dup.
* test/openssl/test_config.rb: added tests for Config#clone.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19 08:22:31 +00:00
mrkn
1d04aedb5a
* array.c (rb_ary_permutation, rb_ary_repeated_permutation, rb_ary_repeated_combination, rb_ary_product): use ary_make_shared_copy instead of ary_make_substitution. [ruby-dev:42067] [Bug #3708 ]
...
* test/ruby/test_array.rb (test_product, test_repeated_permutation, test_repeated_combination): append assertions against [Bug #3708 ].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19 03:10:15 +00:00
mrkn
4023ffa92f
* array.c (ary_make_shared), test/ruby/test_array.rb (test_permutation): always return the original array when it is shared. [ruby-dev:42067] [Bug #3708 ]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-18 09:42:36 +00:00
naruse
ce5827c6fb
* regcomp.c: revert r26701; it introduces Bug #3681 .
...
[ruby-core:31677]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-17 16:53:25 +00:00
akr
3eabe19ea9
* test/ruby/test_io.rb (test_threaded_flush): test "hi" is not output
...
twice.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-17 11:06:22 +00:00
nobu
0afddf7b0a
Tue Aug 17 07:38:43 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
...
* gem_prelude.rb, lib/rubygems.rb (Gem.suffixes): include empty
suffix. [ruby-core:31730]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16 22:38:46 +00:00
akr
16cd13c051
* ext/pathname/pathname.c (path_basename): Pathname#basename translated
...
from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16 12:40:10 +00:00
mrkn
d86da0fcf1
* ext/bigdecimal/extconf.rb, ext/bigdecimal/bigdecimal.h (labs, llabs): support environments missing labs and llabs.
...
* ext/bigdecimal/bigdecimal.h (vabs): added.
* ext/bigdecimal/extconf.rb, ext/bigdecimal/bigdecimal.h, ext/bigdecimal/bigdecimal.c, test/bigdecimal/test_bigdecimal.rb (TestBigDecimal#test_new): replace U_LONG, S_LONG, S_INT, and U_INT with appropreate standard or ruby-provided types.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 15:22:43 +00:00
nobu
78b10588bf
* test/coverage/test_coverage.rb: added.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 11:59:35 +00:00
nari
e573186407
* test/objspace/test_objspace.rb: added test for objspace.
...
* ext/objspace/objspace.c: considers T_ZOMBIE by lazy sweep GC.
* gc.c: considers that dsize was 0. [ruby-dev:42022]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 09:01:12 +00:00
akr
9229d998b5
wait a process.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 17:16:20 +00:00
akr
3583c42c71
* test/ruby/test_rubyoptions.rb (test_script_from_stdin): disable
...
echo. [ruby-dev:41966]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 15:21:09 +00:00
mrkn
9b0b9ac237
* lib/cmath.rb (CMath.sqrt): use floating-point value. [ruby-core:31672] [Bug #3678 ]
...
* test/test_cmath.rb: added for testing lib/cmath.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 14:30:47 +00:00
akr
e6f6033b16
* lib/optparse.rb: suppress a warning.
...
* test/test_mutex_m.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 12:02:52 +00:00
akr
ec5bb26fa0
* ext/pathname/pathname.c (path_open): Pathname#open
...
translated from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-09 13:15:49 +00:00
akr
acff965a5f
* test/ruby/test_signal.rb (TestSignal#test_exit_action): use spawn
...
instead of fork.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-09 13:12:54 +00:00