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
Terminal 1: | |
$ bundle exec spork | |
Using RSpec | |
Loading Spork.prefork block... | |
Spork is ready and listening on 8989! | |
Running tests with args ["--color", "--fail-fast", "--failure-exit-code", "2", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/epeterson/.rvm/gems/ruby-1.9.3-p125-perf@exact/gems/guard-rspec-0.6.0/lib/guard/rspec/formatters/notification_rspec.rb", "spec"]... | |
Done. | |
[1] 70757 killed bundle exec spork |
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
Terminal 1: | |
$ bundle exec spork | |
Using RSpec | |
Loading Spork.prefork block... | |
Spork is ready and listening on 8989! | |
Running tests with args ["--color", "--fail-fast", "--failure-exit-code", "2", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/epeterson/.rvm/gems/rbx-head/gems/guard-rspec-0.6.0/lib/guard/rspec/formatters/notification_rspec.rb", "spec"]... | |
Done. | |
[1] 70450 killed bundle exec spork |
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
["US-ASCII", "ASCII-8BIT", "UTF-8"].each do |encoding| | |
Encoding.default_internal = encoding | |
puts "With #{encoding} default internal:" | |
[127, 255, 256].each do |number| | |
no_arg = number.chr.encoding rescue "out of range" | |
puts "#{number}.chr is: #{no_arg}" | |
with_arg = number.chr(encoding).encoding rescue "out of range" | |
puts "#{number}.chr('#{encoding}') is: #{with_arg}" | |
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
require 'benchmark' | |
STRING = 'abc' | |
ITERATIONS = 500000 | |
Benchmark.bm(10) do |bench| | |
for n in [2,3,4, 5] | |
n_strings = Array.new(n, STRING) | |
bench.report("add #{n}") do |
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
rake build | |
/Users/epeterson/.rvm/rubies/ruby-1.9.2-p290/bin/ruby vm/codegen/field_extract.rb vm/builtin/basicobject.hpp vm/builtin/object.hpp vm/builtin/integer.hpp vm/builtin/fixnum.hpp vm/builtin/array.hpp vm/builtin/bignum.hpp vm/builtin/executable.hpp vm/builtin/access_variable.hpp vm/builtin/alias.hpp vm/builtin/block_environment.hpp vm/builtin/block_as_method.hpp vm/builtin/bytearray.hpp vm/builtin/chararray.hpp vm/builtin/io.hpp vm/builtin/channel.hpp vm/builtin/module.hpp vm/builtin/class.hpp vm/builtin/compiledmethod.hpp vm/builtin/data.hpp vm/builtin/dir.hpp vm/builtin/exception.hpp vm/builtin/float.hpp vm/builtin/immediates.hpp vm/builtin/iseq.hpp vm/builtin/list.hpp vm/builtin/lookuptable.hpp vm/builtin/ffi_pointer.hpp vm/builtin/methodtable.hpp vm/builtin/nativefunction.hpp vm/builtin/packed_object.hpp vm/builtin/randomizer.hpp vm/builtin/regexp.hpp vm/builtin/staticscope.hpp vm/builtin/string.hpp vm/builtin/symbol.hpp vm/builtin/thread.hpp vm/builtin/tuple.hpp vm/builtin/compactlookuptable.hpp v |
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
diff --git a/kernel/common/array.rb b/kernel/common/array.rb | |
index 58370be..e213ff9 100644 | |
--- a/kernel/common/array.rb | |
+++ b/kernel/common/array.rb | |
@@ -181,179 +181,6 @@ class Array | |
alias_method :slice, :[] | |
- def set_index(index, ent, fin=undefined) | |
- Rubinius.primitive :array_aset |
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
epeterson@ep:~/Sites/rubinius locks ✔ ⇧ $ bin/mspec ci -T -X19 spec/ruby/core/array/rotate_spec.rb | |
rubinius 2.0.0dev (1.9.2 f145b1bb yyyy-mm-dd JI) [x86_64-apple-darwin10.8.0] | |
EEEEEEEEF | |
1) | |
Array#rotate returns a copy of the array whose first n elements is moved to the last ERROR | |
NoMethodError: undefined method `rotate' on an instance of Array. | |
Kernel(Array)#rotate (method_missing) at kernel/delta/kernel.rb:79 | |
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:8 | |
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43 |
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
/Users/epeterson/.rvm/rubies/ruby-1.9.2-p290/bin/ruby vm/codegen/field_extract.rb vm/builtin/basicobject.hpp vm/builtin/object.hpp vm/builtin/integer.hpp vm/builtin/fixnum.hpp vm/builtin/array.hpp vm/builtin/bignum.hpp vm/builtin/executable.hpp vm/builtin/access_variable.hpp vm/builtin/alias.hpp vm/builtin/block_environment.hpp vm/builtin/block_as_method.hpp vm/builtin/bytearray.hpp vm/builtin/chararray.hpp vm/builtin/io.hpp vm/builtin/channel.hpp vm/builtin/module.hpp vm/builtin/class.hpp vm/builtin/compiledmethod.hpp vm/builtin/data.hpp vm/builtin/dir.hpp vm/builtin/exception.hpp vm/builtin/float.hpp vm/builtin/immediates.hpp vm/builtin/iseq.hpp vm/builtin/list.hpp vm/builtin/lookuptable.hpp vm/builtin/ffi_pointer.hpp vm/builtin/methodtable.hpp vm/builtin/nativefunction.hpp vm/builtin/packed_object.hpp vm/builtin/randomizer.hpp vm/builtin/regexp.hpp vm/builtin/staticscope.hpp vm/builtin/string.hpp vm/builtin/symbol.hpp vm/builtin/thread.hpp vm/builtin/tuple.hpp vm/builtin/compactlookuptable.hpp vm/builtin/t |
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
ssssoooosmMMNmmhdhhys+/+oosyyyyyyyssssssssssssoooooooooooooooo+++++++++++++++++++++++++++++///////// | |
ssssooooomMNmddddhdhhyo+++oossssyyssssssssssssoooooooooooooooo+++++++++++++++++++++++++++++///////// | |
ssssooooomMNmmmmhysyhhhyso+oooooossssssssssssoooooooooooooo+o++++++++++++++++++++++++++++++///////// | |
ssssooooodMMNmddhdddhhyyysssoooo++ossssssssssoooooooooooooooo++++++++++++++++++++++++++++/////////// | |
sssoooooohMMNNmmmdhysshyyhysyso+oo+oyssssssssssosssooooooooo+o+++++++++++++++++++++++++///////////// | |
sssooooosyMMMNddysssssyysyyhydhyosssyyyyyhhhyyhyyhyhsssosoooooo++++++++++++++++++++++++++++ooossssso | |
sssoooosssNMMMMNmdhhyyysyhdmNdmmhssyyyyyhhhhhdhhhhyyyssysssysssooooo++++++++oooooossssyhddmdhhyssooo | |
ssssosossyNMMMMMNdyyhhhdmNMMMMmNmhssddhyhhhdhhhhhhyyyoosyyysyyyyyyyssssssyhdmmmmNNNNmmdhyysooosssso+ | |
yyyssssssyNMMMMNmmdmmNNNMMMMMMMmNmdhmmdhhhyhyyhhdhyhs++ssyyssyyyhddhmmddmmNNNMNNNdhhsssssyyyyyssooo+ | |
yyyyyysyyhMMMMMMMNNNNNMMMMMMMMMNdmNNNmdhdhyhyhhdhdyhys+osysssssyhdmmmmdmNmmdddhhhhhhyhyyyhhyyysooso+ |
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
module DataMapper | |
module Adapters | |
class RedisAdapter < AbstractAdapter | |
def find_matches(query, operand) | |
@redis.smembers("#{query.model.to_s.downcase}:#{operand.subject.name}:#{encode(operand.value)}").collect{|k| k.gsub(/\[|\]/, "")} | |
end | |
end | |
end | |
end |