This file contains hidden or 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
| [branch] | |
| # git checkout foo automatically checks out origin/foo and names it foo and sets tracking branch. | |
| autosetupmerge = true | |
| # automatically set tracking branch to rebase instead of merge | |
| autosetuprebase = always | |
| [diff] | |
| # automatically detects renames | |
| renames = true | |
| [rebase] | |
| # automatically sets --autosquash when rebasing interactively |
This file contains hidden or 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 InfoDesk | |
| def trains | |
| :trains | |
| end | |
| def flights | |
| :flights | |
| end | |
| def buses | |
| :buses | |
| end |
This file contains hidden or 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 | |
| CONST = 42 | |
| end | |
| class Bar < Foo | |
| def self.foo | |
| CONST | |
| end | |
| class << self |
This file contains hidden or 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
| require 'rubygems' | |
| require 'rspec' | |
| class Sequence | |
| def initialize(*elements) | |
| @elements = elements.sort | |
| end | |
| def elements | |
| @elements.dup |
This file contains hidden or 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
| o = Object.new | |
| def o.==(num) | |
| true | |
| end | |
| puts o == 42 | |
| puts [o].include?(42) | |
| puts [o].include?("a") | |
| puts [o].include?(nil) | |
| puts [o].include?(Object.new) |
NewerOlder