This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DishonestString < String | |
def is_utf8? | |
return false if calling_method == 'quote' | |
super | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
def bar | |
puts "There can be only one?" | |
end | |
end | |
f = Foo.new | |
orig_method = f.method(:bar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Reviewer < ActiveRecord::Base | |
has_many :accounts | |
end | |
class Account < ActiveRecord::Base | |
belongs_to :reviewer | |
end | |
> Reviewer.where(:lastname => 'bloe', :firstname => 'joe').all(:offset => 0, :include => :accounts).first.accounts.present? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* We use default fragment size, unless the Framed-MTU | |
* tells us it's too big. Note that we do NOT account | |
* for the EAP-TLS headers if conf->fragment_size is | |
* large, because that config item looks to be confusing. | |
* | |
* i.e. it should REALLY be called MTU, and the code here | |
* should figure out what that means for TLS fragment size. | |
* asking the administrator to know the internal details | |
* of EAP-TLS in order to calculate fragment sizes is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exception `NoMethodError' at /usr/local/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/specification.rb:534 - undefined method `to_ary' for #<Gem::Specification name=rack-mount version=0.0.1> | |
Exception `NoMethodError' at /usr/local/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/specification.rb:534 - undefined method `to_ary' for #<Gem::Specification name=arel version=0.2.pre> | |
Exception `NoMethodError' at /usr/local/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/specification.rb:534 - undefined method `to_ary' for #<Gem::Specification name=rails version=3.0.pre> | |
Exception `NoMethodError' at /usr/local/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/specification.rb:534 - undefined method `to_ary' for #<Gem::Specification name=activerecord version=3.0.pre> | |
Exception `NoMethodError' at /usr/local/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/specification.rb:534 - undefined method `to_ary' for #<Gem::Specification name=activeresource version=3.0.p |