⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (312 Bytes)
Bug #871
» test.rb
Test code that works on Ruby 1.8, segfaults on 1.9.1-p2 -
csirac2 (Paul Harvey)
, 12/14/2008 03:41 PM
class
SandBox
def
abc
(
*
args
)
yield
(
*
args
)
end
define_method
:xyz
do
|*
args
,
&
block
|
puts
'About to call the block:'
block
.
call
(
*
args
)
end
end
puts
'SandBox.new.abc:'
SandBox
.
new
.
abc
(
1
,
2
,
3
){
|*
args
|
p
args
}
# => [1, 2, 3]
puts
'SandBox.new.xyz:'
SandBox
.
new
.
xyz
(
1
,
2
,
3
){
|*
args
|
p
args
}
# => [1, 2, 3]
« Previous
1
2
Next »
(1-1/2)
Loading...