зеркало из https://github.com/github/ruby.git
* string.c (rb_str_upto): ("a"..."a").to_a should return [].
[ruby-core:01634] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
98a3a9db97
Коммит
231d3e9654
|
@ -1,3 +1,8 @@
|
|||
Thu Oct 16 16:54:57 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* string.c (rb_str_upto): ("a"..."a").to_a should return [].
|
||||
[ruby-core:01634]
|
||||
|
||||
Thu Oct 16 16:40:51 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ext/tk/lib/tk.rb:
|
||||
|
|
4
string.c
4
string.c
|
@ -1174,9 +1174,11 @@ rb_str_upto(beg, end, excl)
|
|||
{
|
||||
VALUE current, after_end;
|
||||
ID succ = rb_intern("succ");
|
||||
int n;
|
||||
|
||||
StringValue(end);
|
||||
if (rb_str_cmp(beg, end) > 0) return beg;
|
||||
n = rb_str_cmp(beg, end);
|
||||
if (n > 0 || (excl && n == 0)) return beg;
|
||||
after_end = rb_funcall(end, succ, 0, 0);
|
||||
current = beg;
|
||||
while (!rb_str_equal(current, after_end)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче