From: Vitaly Belman Date: 2006-01-29T06:19:48+09:00 Subject: Accessing global variable from a function I'd like to access a global variable from within a function, without passing it as paramater. How do I do it? e.g def func puts i end i = 5 func In PHP, for example, I could use the "global" keyword in the function. -- Posted via http://www.ruby-forum.com/.