# [Ruby] About the difference between 2 dots and 3 dots of range object.

This is a personal memo.

About the difference between `..`

and`...`

of range objects that represent consecutive numbers.

## the difference

Whether to include the ending value

range object |
End value |

.. |
Including |

... |
Not included |

## 2 dots
In the case of two dots, the end value is included.
If it is `1..3`, ** 3 is also included **.

`python`

```
for i in 1..3
p i
end
##output
1
2
3
```

## 3 dots
In the case of 3 dots, the end value is not included.
If it is `1..3`, ** 3 is not included **.

`python`

```
for i in 1...3
p i
end
##output
1
2
```