[#85349] [Ruby trunk Bug#14334] Segmentation fault after running rspec (ruby/2.5.0/erb.rb:885 / simplecov/source_file.rb:85) — pragtob@...
Issue #14334 has been updated by PragTob (Tobias Pfeiffer).
3 messages
2018/02/02
[#85358] Re: [ruby-cvs:69220] nobu:r62039 (trunk): compile.c: unnecessary freezing — Eric Wong <normalperson@...>
nobu@ruby-lang.org wrote:
5 messages
2018/02/03
[#85612] Why require autoconf 2.67+ — leam hall <leamhall@...>
Please pardon the intrusion; I am new to Ruby and like to pull the
6 messages
2018/02/17
[#85634] [Ruby trunk Bug#14494] [PATCH] tool/m4/ruby_replace_type.m4 use AC_CHECK_TYPES for HAVE_* macros — normalperson@...
Issue #14494 has been reported by normalperson (Eric Wong).
3 messages
2018/02/19
[#85674] [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — matz@...
Issue #13618 has been updated by matz (Yukihiro Matsumoto).
5 messages
2018/02/20
[#85686] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2018/02/20
matz@ruby-lang.org wrote:
[#85704] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Koichi Sasada <ko1@...>
2018/02/21
On 2018/02/20 18:06, Eric Wong wrote:
[ruby-core:85683] [Ruby trunk Feature#4541][Rejected] Inconsistent Array.slice()
From:
matz@...
Date:
2018-02-20 08:39:21 UTC
List:
ruby-core #85683
Issue #4541 has been updated by matz (Yukihiro Matsumoto).
Status changed from Assigned to Rejected
We don't want to change the behavior of basic methods. That would break existing code.
FYI, the slice is `nil` when the starting point does not fit in the array.
Matz.
----------------------------------------
Feature #4541: Inconsistent Array.slice()
https://bugs.ruby-lang.org/issues/4541#change-70482
* Author: kbl (Marcin Pietraszek)
* Status: Rejected
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version:
----------------------------------------
Array `slice`/`[]` method is a bit inconsistent. Is it just poorly documented "feature" or a bug? In API doc I can't find this behaviour mentioned as a "special case".
```ruby
def test_array_slice
array = ['a', 'b', 'c']
assert_equal nil, array[3]
assert_eaual nil, array[4]
assert_eaual [], array[3, 0] #
assert_equal nil, array[4, 0] # [] expected (or both nils in array[3, 0] and array[4, 0])
assert_equal ['c'], array[2..2]
assert_equal [], array[3..3] #
assert_equal nil, array[4..4] # [] expected (or both nils in array[3..3] and array[4..4])
end
```
Same behaviour can be reproduced on ruby 1.8.7 (2010-12-23 patchlevel 330) [x86_64-linux].
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>