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
| singleton Logger | |
| def output | |
| @output ||= STDOUT | |
| end | |
| attr_writer :output | |
| def log(text) | |
| output.puts(text) | |
| 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
| 186 XML.ri | |
| 187 Test.ri | |
| 191 RbConfig.ri | |
| 197 XMLEncoding_ja.ri | |
| 198 Data.ri | |
| 203 RDocTask.ri | |
| 204 DefaultKey.ri | |
| 210 GDBMError.ri | |
| 210 SDBMError.ri | |
| 211 GDBMFatalError.ri |
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
| seacreature:~$ rvm 1.8.7 | |
| seacreature:~$ irb | |
| >> if true: true end | |
| => true | |
| >> exit | |
| seacreature:~$ rvm 1.9.2 | |
| seacreature:~$ irb | |
| >> if true: true end | |
| SyntaxError: (irb):1: syntax error, unexpected ':', expecting keyword_then or ';' or '\n' | |
| if true: true 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
| module Circuitry | |
| extend self | |
| def []=(name, definition) | |
| circuits[name] = definition | |
| end | |
| def [](name) | |
| circuits[name] | |
| 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 MyEnumerator | |
| include Enumerable | |
| def initialize(target, *iterator) | |
| @target = target | |
| @iterator = iterator | |
| end | |
| def each(&block) | |
| @target.send(*@iterator, &block) |
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 MyEnumerator | |
| include Enumerable | |
| def initialize(target, *iterator) | |
| @target = target | |
| @iterator = iterator | |
| end | |
| def each(&block) |
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 Bot | |
| def initialize(parts) | |
| add_parts(parts) | |
| setup | |
| end | |
| def add_parts(parts) | |
| parts.each { |part| extend(part) } | |
| 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 Point | |
| def initialize(x,y) | |
| @x, @y = x, y | |
| end | |
| end | |
| module Positionable | |
| attr_accessor :map | |
| def neighbors |
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
| # Is this a bug or just a behavior change? Know a workaround to get the 1.8 behavior in 1.9? | |
| I would even be okay with explicitly having to define inspect as long as | |
| I could get the original inspect behavior from Object back, but would prefer something simpler... | |
| ## Ruby 1.9.2 | |
| >> class A | |
| >> def initialize(x,y,z) | |
| >> @x, @y, @z = x,y,z | |
| >> end |