From: Robert Klemme Date: 2012-12-13T00:42:24+09:00 Subject: Re: How I can create/extract a variable/hash into the current binding in Ruby? On Wed, Dec 12, 2012 at 2:44 PM, Ramon de C Valle wrote: > On 12/12/2012 11:29 AM, Robert Klemme wrote: >> On Wed, Dec 12, 2012 at 12:40 PM, Ramon de C Valle wrote: >> >>> Thank you for the additional information! Any suggestions of a possible >>> "more Ruby" way of doing this? >> >> Keep the data in the Hash and use it there. If you think about it you >> will need eval for manipulation of the data as well because you do not >> know beforehand what local variables you have, don't you? > Yes, I know beforehand because they are predefined FFI structs. Whatever that is. > I'm just > trying to avoid things like > event[:u][:exception][:exception_record][:exception_information][0] (see > https://github.com/rcvalle/active_fuzzer/blob/master/bin/active_file.rb#L44). I have no idea what you are doing there but the huge amount of repeated code looks highly suspicious. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/