Skip to content

Instantly share code, notes, and snippets.

module I18n
module Registry
protected
def lookup(locale, key, scope = [], options = {})
@log ||= Logger.new(File.join(Rails.root, 'log', 'i18n_registry.log'))
@log.info key
super
end
end
end
@squidarth
squidarth / brainfuck.rb
Created August 17, 2012 17:16
Brainfuck Interpreter
def parseBrainFuck(string, in_while = false)
global_stack = []
curr_index = 0
parse_index = 0
parse_lookup = {
"+" => lambda {global_stack[curr_index] += 1},
"-" => lambda {global_stack[curr_index] -= 1},
">" => lambda {curr_index += 1},