提交 62c62bc3 编写于 作者: B Brian Morearty

Revert the guide after removing varargs from `in?`.

上级 d7da403d
...@@ -476,12 +476,11 @@ NOTE: Defined in `active_support/core_ext/kernel/reporting.rb`. ...@@ -476,12 +476,11 @@ NOTE: Defined in `active_support/core_ext/kernel/reporting.rb`.
### `in?` ### `in?`
The predicate `in?` tests if an object is included in another object or a list of objects. An `ArgumentError` exception will be raised if a single argument is passed and it does not respond to `include?`. The predicate `in?` tests if an object is included in another object. An `ArgumentError` exception will be raised if the argument passed does not respond to `include?`.
Examples of `in?`: Examples of `in?`:
```ruby ```ruby
1.in?(1,2) # => true
1.in?([1,2]) # => true 1.in?([1,2]) # => true
"lo".in?("hello") # => true "lo".in?("hello") # => true
25.in?(30..50) # => false 25.in?(30..50) # => false
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册