Type inference in for / each blocks

Hello again,


I'd like to make the suggestion to improve type inference for rails models and variables in "each" blocks



@users = User.find(:all)
@ints = [1,2,3]

works:
@user[0].

doesnt work:
@users.each do |u|
    u.
end



 


doesnt work:
for u in @users
    u.
end

works:
for i in [1,2,3]
    i.
end

doesnt work:
for i in @ints
   i.
end

Cheers :-)

1 comment
Comment actions Permalink

Hello Stefan,

Good idea, I've filled an issue - http://www.jetbrains.net/jira/browse/RUBY-4186

0

Please sign in to leave a comment.