<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_range.rb, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) b176315827d1082f43628013a7d89fda02724d33: [Backport #20324] (#10329)</title>
<updated>2024-03-22T01:33:40+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>nurse@users.noreply.github.com</email>
</author>
<published>2024-03-22T01:33:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6d6818883b8f613fe9b6c72ac7eb9b313bba097b'/>
<id>6d6818883b8f613fe9b6c72ac7eb9b313bba097b</id>
<content type='text'>
[Bug #20324] Uncomparable ranges are not overlapping</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #20324] Uncomparable ranges are not overlapping</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #19977] Fix (nil..nil) === x not to raise TypeError</title>
<updated>2023-12-22T07:15:33+00:00</updated>
<author>
<name>Kouhei Yanagita</name>
<email>yanagi@shakenbu.org</email>
</author>
<published>2023-10-29T05:57:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e8639098ed78f8f8f7c263d8b6f2d68822945a78'/>
<id>e8639098ed78f8f8f7c263d8b6f2d68822945a78</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make Range#reverse_each raise TypeError if endless</title>
<updated>2023-11-28T06:10:42+00:00</updated>
<author>
<name>Kouhei Yanagita</name>
<email>yanagi@shakenbu.org</email>
</author>
<published>2022-01-27T05:37:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1a16b6ffc2d48b93c730cd6e57fac6a68fa05737'/>
<id>1a16b6ffc2d48b93c730cd6e57fac6a68fa05737</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make beginless Range#size return nil if it ends with non-numeric</title>
<updated>2023-10-26T01:56:47+00:00</updated>
<author>
<name>fn ⌃ ⌥</name>
<email>70830482+FnControlOption@users.noreply.github.com</email>
</author>
<published>2022-01-06T21:19:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3ef7b632a07025472ac7a7f18f6433c089d7be88'/>
<id>3ef7b632a07025472ac7a7f18f6433c089d7be88</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #19926] Fix Range#size for ranges with a Rational endpoint</title>
<updated>2023-10-14T02:22:42+00:00</updated>
<author>
<name>Kouhei Yanagita</name>
<email>yanagi@shakenbu.org</email>
</author>
<published>2023-10-13T23:50:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b28c1d2c5644c726bba60cd35ce9313da6e86a4f'/>
<id>b28c1d2c5644c726bba60cd35ce9313da6e86a4f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Range#reverse_each implementation for performance</title>
<updated>2023-10-12T08:34:49+00:00</updated>
<author>
<name>Kouhei Yanagita</name>
<email>yanagi@shakenbu.org</email>
</author>
<published>2022-01-26T04:13:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=66fabefa0312859f5bbd7c95d745b677e44b20be'/>
<id>66fabefa0312859f5bbd7c95d745b677e44b20be</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize `Range#count` by using `range_size` if possible</title>
<updated>2023-10-04T15:19:55+00:00</updated>
<author>
<name>Kouhei Yanagita</name>
<email>yanagi@shakenbu.org</email>
</author>
<published>2023-10-04T15:19:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6ae2996e291750bab4ff59a06ba11c8d6bbe5aaa'/>
<id>6ae2996e291750bab4ff59a06ba11c8d6bbe5aaa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize Range#bsearch for beginless/endless ranges within Fixnum</title>
<updated>2023-09-21T01:30:58+00:00</updated>
<author>
<name>Kouhei Yanagita</name>
<email>yanagi@shakenbu.org</email>
</author>
<published>2023-09-19T06:29:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7e350f53107533856b0a87c26e5a1e5505ea5d59'/>
<id>7e350f53107533856b0a87c26e5a1e5505ea5d59</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix regression when testing inclusion in unbounded ranges</title>
<updated>2023-09-16T15:02:31+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2023-09-15T23:58:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=25711683e86271385e8abe09a9c03782000e48db'/>
<id>25711683e86271385e8abe09a9c03782000e48db</id>
<content type='text'>
Caused by 04a92a6764bf678919cf4b68a27496a39d6b886a.  This treats
unbounded ranges of arbitrary objects the same as how unbounded
string ranges are treated:

  (..x)  === y  # (y &lt;=&gt; x) &lt;= 0
  (...x) === y  # (y &lt;=&gt; x) &lt;  0
  (x..)  === y  # (x &lt;=&gt; y) &lt;= 0

Fixes [Bug #19864]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Caused by 04a92a6764bf678919cf4b68a27496a39d6b886a.  This treats
unbounded ranges of arbitrary objects the same as how unbounded
string ranges are treated:

  (..x)  === y  # (y &lt;=&gt; x) &lt;= 0
  (...x) === y  # (y &lt;=&gt; x) &lt;  0
  (x..)  === y  # (x &lt;=&gt; y) &lt;= 0

Fixes [Bug #19864]
</pre>
</div>
</content>
</entry>
<entry>
<title>[Feature #19839] Fix `Range#overlap?` for empty ranges</title>
<updated>2023-09-16T08:24:21+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-09-14T13:45:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b4213a73b807cf8c8884e29d37308c46ca80352a'/>
<id>b4213a73b807cf8c8884e29d37308c46ca80352a</id>
<content type='text'>
Empty ranges do not overlap with any range.

Regarding benchmarks, PR#8242 is significantly faster in some cases,
but one of these two cases is a wrong result.

|                           |ActiveSupport| PR#8242|built-ruby|
|:--------------------------|------------:|-------:|---------:|
|(2..3).overlap?(1..1)      |       7.761M| 15.053M|   32.368M|
|                           |            -|   1.94x|     4.17x|
|(2..3).overlap?(2..4)      |      25.720M| 55.070M|   21.981M|
|                           |        1.17x|   2.51x|         -|
|(2..3).overlap?(4..5)      |       7.616M| 15.048M|   21.730M|
|                           |            -|   1.98x|     2.85x|
|(2..3).overlap?(2..1)      |      25.585M| 56.545M|   32.786M|
|                           |            -|   2.21x|     1.28x|
|(2..3).overlap?(0..1)      |       7.554M| 14.755M|   32.545M|
|                           |            -|   1.95x|     4.31x|
|(2..3).overlap?(...1)      |       6.681M|  5.843M|   32.255M|
|                           |        1.14x|       -|     5.52x|
|(2...3).overlap?(..2)      |       6.676M|  5.817M|   21.572M|
|                           |        1.15x|       -|     3.71x|
|(2...3).overlap?(3...)     |       7.392M| 14.755M|   31.805M|
|                           |            -|   2.00x|     4.30x|
|(2..3).overlap?('a'..'d')  |       3.675M|  3.482M|   17.009M|
|                           |        1.06x|       -|     4.89x|
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Empty ranges do not overlap with any range.

Regarding benchmarks, PR#8242 is significantly faster in some cases,
but one of these two cases is a wrong result.

|                           |ActiveSupport| PR#8242|built-ruby|
|:--------------------------|------------:|-------:|---------:|
|(2..3).overlap?(1..1)      |       7.761M| 15.053M|   32.368M|
|                           |            -|   1.94x|     4.17x|
|(2..3).overlap?(2..4)      |      25.720M| 55.070M|   21.981M|
|                           |        1.17x|   2.51x|         -|
|(2..3).overlap?(4..5)      |       7.616M| 15.048M|   21.730M|
|                           |            -|   1.98x|     2.85x|
|(2..3).overlap?(2..1)      |      25.585M| 56.545M|   32.786M|
|                           |            -|   2.21x|     1.28x|
|(2..3).overlap?(0..1)      |       7.554M| 14.755M|   32.545M|
|                           |            -|   1.95x|     4.31x|
|(2..3).overlap?(...1)      |       6.681M|  5.843M|   32.255M|
|                           |        1.14x|       -|     5.52x|
|(2...3).overlap?(..2)      |       6.676M|  5.817M|   21.572M|
|                           |        1.15x|       -|     3.71x|
|(2...3).overlap?(3...)     |       7.392M| 14.755M|   31.805M|
|                           |            -|   2.00x|     4.30x|
|(2..3).overlap?('a'..'d')  |       3.675M|  3.482M|   17.009M|
|                           |        1.06x|       -|     4.89x|
</pre>
</div>
</content>
</entry>
</feed>
