[#82518] [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — mame@...
Issue #13618 has been updated by mame (Yusuke Endoh).
5 messages
2017/08/30
[#82552] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2017/08/31
[email protected] wrote:
[#82756] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wrong <normalperson@...>
2017/09/12
Eric Wrong <[email protected]> wrote:
[ruby-core:82440] [Ruby trunk Bug#12422] CSV.Table.== fails to check object type
From:
hsbt@...
Date:
2017-08-22 06:25:35 UTC
List:
ruby-core #82440
Issue #12422 has been updated by hsbt (Hiroshi SHIBATA).
Assignee changed from JEG2 (James Gray) to hsbt (Hiroshi SHIBATA)
----------------------------------------
Bug #12422: CSV.Table.== fails to check object type
https://bugs.ruby-lang.org/issues/12422#change-66249
* Author: robotfelix (Felix Kenton)
* Status: Assigned
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Target version:
* ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
* Backport: 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED
----------------------------------------
`CSV::Table`'s equality method presumes it is comparing another `CSV::Table`. It fails when the object to be compared doesn't support the `table` method.
This is more or less the same issue as reported and fixed in Bug #7528 (https://bugs.ruby-lang.org/issues/7528).
### Test Case
```ruby
require 'csv'
CSV.parse("test", headers: true) == nil
# => NoMethodError: undefined method `table' for nil:NilClass
```
### Suggested Patch
Following the implementation used in `CSV::Row`, a suggested patch would be:
```ruby
def ==(other)
return @table == other.table if other.is_a? CSV::Table
@table == other
end
```
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>