BUG: intersection of decreasing RangeIndexes
State: closed

- [x] closes #17296
- [x] tests added / passed
- [x] passes `git diff master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Bug
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=h1) Report
> Merging [#17374](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/0d676a3ccf1d7aa986416a7488b941496f936d98?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/17374/graphs/tree.svg?token=eZ4WkYLtcO&src=pr&width=650&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #17374      +/-   ##
==========================================
- Coverage   91.01%   90.99%   -0.02%     
==========================================
  Files         163      163              
  Lines       49567    49574       +7     
==========================================
- Hits        45113    45111       -2     
- Misses       4454     4463       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.78% <100%> (ø)` | :arrow_up: |
| #single | `40.25% <7.69%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/range.py](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9yYW5nZS5weQ==) | `92.35% <100%> (+0.16%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.72% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=footer). Last update [0d676a3...8d2038c](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=h1) Report
> Merging [#17374](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/84a39f99013f238a2e1df9ba63bdaa8a3fd00c08?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/17374/graphs/tree.svg?width=650&height=150&src=pr&token=eZ4WkYLtcO)](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #17374      +/-   ##
==========================================
- Coverage   91.15%   91.14%   -0.02%     
==========================================
  Files         163      163              
  Lines       49587    49591       +4     
==========================================
- Hits        45203    45198       -5     
- Misses       4384     4393       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.92% <100%> (ø)` | :arrow_up: |
| #single | `40.25% <0%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/range.py](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9yYW5nZS5weQ==) | `92.28% <100%> (+0.09%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.72% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=footer). Last update [84a39f9...457e7ff](https://codecov.io/gh/pandas-dev/pandas/pull/17374?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

FYI: I had to [mark a test as xfailing](https://github.com/pandas-dev/pandas/pull/17272/files#diff-9ae0a94014431c93e23da48433811c49R568) in #17272 due to this bug.  The PR is still open, but depending on when it gets merged you may need to rebase and remove the xfail.
@jreback ping
lgtm. can you rebase and ping on green just to make sure.
@jreback ping
thanks!