⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (325 Bytes)
Bug #3860
ยป inst_eval_1.9.2.rb
kliuless (Kelvin Liu)
, 09/23/2010 02:52 AM
# ruby-1.9.2-p0
class
Foo
def
initialize
(
a
);
@a
=
a
end
# accept any number of args
def
get
(
*
args
)
@a
end
end
foo
=
Foo
.
new
1
p
[
'foo.get'
,
foo
.
get
]
foo_pr
=
foo
.
method
(
:get
).
to_proc
p
[
'foo_pr[]'
,
foo_pr
[]]
# no error
[
0
].
each
&
foo_pr
# aborts on ruby-1.9.2 but not 1.8.7 or 1.9.1
foo
.
instance_eval
&
foo_pr
(1-1/1)
Loading...