I've discovered a crazy bug that's really confusing me. I'm curious to hear if anyone can explain it.
Here's some code in foo.rb:
class Superclass
unless ENV['NORMAL_METHOD_DEF']
define_method :regex do
/^(\d)$/
end| # Usage: | |
| # 1. Drop this file into lib/capistrano/submodule_strategy.rb | |
| # 2. Add the following to your Capfile: | |
| # require 'capistrano/git' | |
| # require './lib/capistrano/submodule_strategy' | |
| # 3. Add the following to your config/deploy.rb | |
| # set :git_strategy, SubmoduleStrategy | |
| module SubmoduleStrategy | |
| # do all the things a normal capistrano git session would do |
| <script> | |
| n = prompt().split(""); | |
| c = "q=n[0];w=n[1];r[x=n.join('')*1] || e(y[(x+'').length])"; | |
| t = "tausend"; h = "hundert";j='zig'; | |
| y=[,,"w==0?r[q]+j:(q==1?r[w]+r[10]:r[w]+'und'+(i[q]||r[q]+j))","n.shift();r[q]+h+e(c)","n=n.slice(-3);r[q]+t+e(c)","k=n.splice(2);u=e(c);n=k;u+t+e(c)","e(y[5].replace(2,3))"]; | |
| r="0ein0zwei0drei0vier0fuenf0sechs0sieben0acht0neun0zehn0elf0zwölf".split(0); | |
| r[20]="zwanzig";r[30]="dreißig";i=[,,r[20],r[30]]; | |
| alert((e = eval)(c).replace(/(en|s)z/,'z').replace(/in$/,'$1s')) | |
| </script> |
I've discovered a crazy bug that's really confusing me. I'm curious to hear if anyone can explain it.
Here's some code in foo.rb:
class Superclass
unless ENV['NORMAL_METHOD_DEF']
define_method :regex do
/^(\d)$/
end| group :assets do | |
| gem 'compass-rails','~> 1.0.0.rc.2' | |
| gem 'compass-colors' | |
| gem 'sassy-buttons' | |
| gem 'sass-rails', '~> 3.2.3' | |
| # non-compass gems omitted for brevity | |
| end |
| module MyApp | |
| class Application < Rails::Application | |
| if Rails.env == 'test' | |
| require 'diagnostic' | |
| config.middleware.use(MyApp::DiagnosticMiddleware) | |
| end | |
| end | |
| end |