[#88925] [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical — ko1@...
Issue #15095 has been updated by ko1 (Koichi Sasada).
4 messages
2018/09/09
[#88927] Re: [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical
— Eric Wong <normalperson@...>
2018/09/09
[email protected] wrote:
[#88926] [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical — ko1@...
Issue #15095 has been updated by ko1 (Koichi Sasada).
3 messages
2018/09/09
[#89218] [Ruby trunk Bug#15130] open-uri hangs on cygwin — duerst@...
SXNzdWUgIzE1MTMwIGhhcyBiZWVuIHVwZGF0ZWQgYnkgZHVlcnN0IChNYXJ0aW4gRMO8cnN0KS4K
5 messages
2018/09/30
[ruby-core:88918] [Ruby trunk Feature#15093] Retrive Array elements with infinite ranges specified by Float::INFINITY
From:
shevegen@...
Date:
2018-09-09 09:24:50 UTC
List:
ruby-core #88918
Issue #15093 has been updated by shevegen (Robert A. Heiler).
I can not say much about the reasoning (I am neutral there) but
I agree in one regards - if we use a large number, we get all
Array members:
a = [1,2,3,4] # => [1, 2, 3, 4]
a[0..111111111] # => [1, 2, 3, 4]
So from this point of view, in this context, infinity could also
mean a very large number, in which case the operation should
or could be treated like any other high number.
But I think matz has to have a look at this since it correlates
with the topic of infinity (and to some extent "ranges"; not so
much in this example alone necessarily, but I think infinity has
to do with ranges as well).
----------------------------------------
Feature #15093: Retrive Array elements with infinite ranges specified by Float::INFINITY
https://bugs.ruby-lang.org/issues/15093#change-73955
* Author: v0dro (Sameer Deshmukh)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
Currently in Ruby head (2.6) the following gives an error:
~~~ ruby
2.6-head :001 > a = [1,2,3,4]
# => [1, 2, 3, 4]
2.6-head :002 > a[0..Float::INFINITY]
#Traceback (most recent call last):
# 2: from /home/sameer/.rvm/rubies/ruby-2.6-head/bin/irb:11:in `<main>'
# 1: from (irb):2
#RangeError (float Inf out of range of integer)
~~~
I think `Array` should support infinite ranges created by `Float::INFINITY` as well
since `0..nil` and `0..Float::INFINITY` are both supposed to create 'infinite' ranges
and having different behavior for each of them is inconsistent.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>