⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (618 Bytes)
Bug #730
» bug19.rb
Earlier test cases -
sander (Sander Land)
, 11/09/2008 06:22 AM
def
wrap
(
m
)
Module
.
new
{
include
m
def
foo
super
*
3
end
}
end
module
A
def
foo
"Hello!"
end
end
# stack level too deep (SystemStackError) in 1.9
$mod
=
[
A
,
A
]
$mod
.
map
{
|
mod
|
wrap
(
mod
)
}.
each
{
|
m
|
p
Class
.
new
{
include
m
}.
new
.
foo
}
# NO error in 1.9 when removing the map
$mod
.
each
{
|
mod
|
m
=
wrap
(
mod
)
p
Class
.
new
{
include
m
}.
new
.
foo
}
# Also an error on 'manual map'
$mod
=
[
wrap
(
A
),
wrap
(
A
)]
$mod
.
each
{
|
m
|
p
Class
.
new
{
include
m
}.
new
.
foo
}
# But no error on mapping single-element arrays
$mod
=
[
A
]
$mod
.
map
{
|
mod
|
wrap
(
mod
)
}.
each
{
|
m
|
p
Class
.
new
{
include
m
}.
new
.
foo
}
« Previous
1
2
Next »
(1-1/2)
Loading...