⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (250 Bytes)
Bug #15808
ยป forwardable_bug.rb
kyrylo (Kyrylo Silin)
, 04/28/2019 04:01 PM
require
'forwardable'
require
'ostruct'
class
A
extend
Forwardable
def_delegators
:@foo
,
:print
,
:bar
def
initialize
(
foo
)
@foo
=
foo
end
end
obj
=
A
.
new
(
OpenStruct
.
new
(
print:
123
,
bar:
456
))
p
"print -
#{
obj
.
print
}
; bar -
#{
obj
.
bar
}
"
(1-1/1)
Loading...