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
# This patch is for storing "raw" error messages/symbols in Errors object, before they are translated into human | |
# readable messages. | |
# | |
# u = User.create | |
# u.errors.messages # => {:login => ["cannot be blank"], :year_of_birth => ["must be greater than 1900"]} | |
# u.errors.raw # => {:login => [{:blank => {}], :year_of_birth => [{:greater_than => {:value => 1618, :count => 1900}}]} | |
module ActiveModel | |
class Errors |
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
1) Failure: | |
test_should_get_daily_offers(Api::OffersControllerTest) [test/functional/api/offers_controller_test.rb:134]: | |
<{"status"=>"ok", | |
"offers"=> | |
[{"id"=>2, | |
"partner_id"=>2, | |
"icon_url"=>"/system/offers/icons/original/100x100.png", | |
"name"=>"50% off second item", | |
"summary"=>"Buy any product at our store, get second 50% cheaper!", | |
"expires_at"=>1351437987, |
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 ObfuscatedStrings { | |
static | |
{ | |
String[] arrayOfString = new String[9]; | |
char[] arrayOfChar1 = "$\037@1h+\b\f-d+\037\f=r+\032J,p\006\016F:x+\bJ?q6".toCharArray(); | |
int i = arrayOfChar1.length; | |
int j = 0; | |
char[] arrayOfChar2; | |
int i1; |
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
### Keybase proof | |
I hereby claim: | |
* I am karolsarnacki on github. | |
* I am karol (https://keybase.io/karol) on keybase. | |
* I have a public key whose fingerprint is 257E 8A80 9785 FB05 97C8 164E B636 26C5 C820 383A | |
To claim this, I am signing this object: |
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
surprise = true and false # => surprise is true | |
surprise = true && false # => surprise is false |
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
surprise = true and false # => surprise is true | |
surprise = true && false # => surprise is false |
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
(surprise = true) and false # => surprise is true | |
surprise = (true && false) # => surprise is false |
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
1 == 1.0 # => true | |
1.eql? 1.0 # => false |
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 show | |
puts 'Foo#show' | |
end | |
end | |
class Bar < Foo | |
def show(text) | |
super | |
OlderNewer