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 LabeledString < String | |
def +(other) | |
LabeledString.new original_plus(other) | |
end | |
end | |
class String | |
alias_method :original_plus, :+ | |
def +(other) |
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
pwh-argon:rubinius pwh$ rvm use ruby | |
Using /Users/pwh/.rvm/gems/ruby-2.0.0-p247 | |
pwh-argon:rubinius pwh$ bin/mspec -tr core/string/match_spec.rb | |
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0] | |
...................... | |
Finished in 0.003534 seconds | |
1 file, 22 examples, 37 expectations, 0 failures, 0 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
class RegexpSub < Regexp | |
def match *args | |
"regexp_match" | |
end | |
end | |
reg = RegexpSub.new("he") | |
p "hello".match(reg) == "regexp_match" |
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 LabeledString < String | |
end | |
s1 = LabeledString.new("Secret Name") | |
/n(a)(m)e/i =~ s1 | |
p [$1, $1.class, LabeledString] | |
p [$2, $2.class, LabeledString] | |
p [$`, $`.class, LabeledString] |
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
/** | |
EasyVR Tester | |
Dump contents of attached EasyVR module | |
and exercise it with playback and recognition. | |
Serial monitor can be used to send a few basic commands: | |
'c' - cycles through available command groups | |
'b' - cycles through built-in word sets | |
's123.' - play back sound 123 if available (or beep) |
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 TaintContext | |
attr_accessor :tainted | |
@@simple_methods = | |
["b", "byteslice", "capitalize", "center", | |
"chomp", "chop", "clone", "crypt", "delete", | |
"downcase", "dump", "dup", "element_set", | |
"encode", "find_character", "find_string", | |
"find_string_reverse", "gsub", "insert", | |
"ljust", "lstrip", "modulo", "multiply", |
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
Your Gemfile lists the gem thin (>= 1.6.2) more than once. | |
You should probably keep only one of them. | |
While it's not a problem now, it could cause errors if you change the version of just one of them later. | |
Using rake 10.4.2 | |
Using Ascii85 1.0.2 | |
Using RedCloth 4.2.9 | |
Using i18n 0.6.11 | |
Using json 1.8.1 | |
Using minitest 5.4.3 | |
Using thread_safe 0.3.4 |
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
RubyGems Environment: | |
- RUBYGEMS VERSION: 2.4.4 | |
- RUBY VERSION: 2.1.0 (2014-12-11 patchlevel 0) [x86_64-darwin14.0.0] | |
- INSTALLATION DIRECTORY: /Users/pwh/.rbenv/versions/rbx-raw-build/gems | |
- RUBY EXECUTABLE: /Users/pwh/.rbenv/versions/rbx-raw-build/bin/rbx | |
- EXECUTABLE DIRECTORY: /Users/pwh/.rbenv/versions/rbx-raw-build/gems/bin | |
- SPEC CACHE DIRECTORY: /Users/pwh/.gem/specs | |
- SYSTEM CONFIGURATION DIRECTORY: /Users/pwh/.rbenv/versions/rbx-raw-build/etc | |
- RUBYGEMS PLATFORMS: | |
- ruby |
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
Updating rubygems-update | |
Fetching: rubygems-update-2.4.5.gem (100%) | |
Successfully installed rubygems-update-2.4.5 | |
Parsing documentation for rubygems-update-2.4.5 | |
Installing ri documentation for rubygems-update-2.4.5 | |
Installing darkfish documentation for rubygems-update-2.4.5 | |
Done installing documentation for rubygems-update after 4 seconds | |
Parsing documentation for rubygems-update-2.4.5 | |
Done installing documentation for rubygems-update after 0 seconds | |
Installing RubyGems 2.4.5 |
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
RubyGems Environment: | |
- RUBYGEMS VERSION: 2.4.5 | |
- RUBY VERSION: 2.1.0 (2014-12-11 patchlevel 0) [x86_64-darwin14.0.0] | |
- INSTALLATION DIRECTORY: /Users/pwh/.rbenv/versions/rbx-raw-build/gems | |
- RUBY EXECUTABLE: /Users/pwh/.rbenv/versions/rbx-raw-build/bin/rbx | |
- EXECUTABLE DIRECTORY: /Users/pwh/.rbenv/versions/rbx-raw-build/gems/bin | |
- SPEC CACHE DIRECTORY: /Users/pwh/.gem/specs | |
- SYSTEM CONFIGURATION DIRECTORY: /Users/pwh/.rbenv/versions/rbx-raw-build/etc | |
- RUBYGEMS PLATFORMS: | |
- ruby |
OlderNewer