< :the previous in number
^ :the list in numerical order
> :the next in number
P :the previous aricle (the previous thread)
N :the next (in thread)
|<:the previous thread
>|:the next thread
^ :the parent (reply-to)
_:the child (an article replying to this)
>:the elder article having the same parent
<:the youger article having the same parent
---:split window and show thread lists
| :split window (vertically) and show thread lists
~ :close the thread frame
.:the index
..:the index of indices
Sorry if this has been rehashed before--I searched the archive and
didn't find anything that seemed identical to the question I've got.
Which is: if I define a method inside a method, currently the inner
method has no access to the outer method's local variables. Is this a
conscious design decision, or a bug?
def test_outer( a, b )
def test_inner( a )
puts "#{a} and #{b}"
end
test_inner( a+b )
end
test_outer( 1, 2 )
I would expect "3 and 2" to be the output, but I get an "undefined local
variable or method `b'" error from test_inner.
Can anyone shed some light on this behavior for me, either in favor of
it, or at the very least explaining it? (Yes, I know I could use a
block, instead of a nested method... but I would like to know why the
nested method approach fails.)
Thanks,
Jamis
--
Jamis Buck
jgb3 / email.byu.edu
ruby -h | ruby -e 'a=[];readlines.join.scan(/-(.)\[e|Kk(\S*)|le.l(..)e|#!(\S*)/) {|r| a << r.compact.first };puts "\n>#{a.join(%q/ /)}<\n\n"'