mpavel (pavel m)
- Login: mpavel
- Registered on: 07/30/2020
- Last sign in: 07/30/2020
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 2 | 2 |
Activity
07/31/2020
-
08:31 AM Ruby Bug #17093: attr_accessor works strange
- are you try this solution?
```
if type.nil?
type = 'default'
end
```
just test it ) -
06:27 AM Ruby Bug #17093: attr_accessor works strange
- you doesnt see "`if type.nil?`" its local variable?
`p type.nil?` return false
next "`if type.nil?`" return true and "`type = 'default'`" will work
why? -
06:42 AM Ruby Bug #17096 (Rejected): attr_accessor doesnt work
- its copy of incorrectly closed https://bugs.ruby-lang.org/issues/17093
```
require 'rubygems'
class A
def initialize(type:)
@type = type
end
def b
p type
p type.nil?
type = 'default' if type.nil?
...
07/30/2020
-
10:31 PM Ruby Bug #17093: attr_accessor works strange
- seriously?
attr_accesor doesnot provide value? -
08:50 PM Ruby Bug #17093 (Rejected): attr_accessor works strange
- ```ruby
require 'rubygems'
class A
def initialize(type:)
@type = type
end
def b
p type
p type.nil?
type = 'default' if type.nil?
type
end
private
attr_accessor :type
end
RSpec.desc...