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
bundle exec rspec spec/features/admin/orders/order_details_spec.rb | |
Instance method "open" is already defined in Object, use generic helper instead or set StateMachines::Machine.ignore_method_conflicts = true. | |
...........*...FF.F...FF....... | |
Pending: | |
Order Details as Admin Shipment edit page splitting to location should warn you if you have not selected a location or shipment | |
# Not yet implemented | |
# ./spec/features/admin/orders/order_details_spec.rb:188 | |
Failures: |
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
mbj@mbj ~/devel/ruby/mri (trunk) % cat **/*.{c,h,rb} | wc -l | |
1206307 | |
mbj@mbj ~/devel/haskell/ghc (master) % cat **/*.{hs,c,h} | wc -l | |
560906 |
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
% bundle exec rails c | |
[1] pry(main)> Rational(1,1) | |
=> 1 | |
% irb -r rational | |
irb(main):001:0> Rational(1,1) | |
=> (1/1) |
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
# original code | |
class Foo | |
def foo | |
:original | |
end | |
end | |
# reference made from original code | |
method = Foo.new.method(:foo) |
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
bundle exec cap production deploy | |
Would you like to enable statistics? Here is an example message we would | |
send: | |
1|2014-12-05T22:44:14+00:00|2.1.5|x86_64-linux|3.3.3|9b65294c | |
Do you want to enable statistics? (y/N): |
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 'concord' | |
module Actor | |
class ProtocolError < RuntimeError | |
end # ProtocolError | |
Undefined = Class.new do | |
INSPECT = 'Actor::Undefined'.freeze | |
def inspect | |
INSPECT |
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
irb(main):018:0> def foo(a, b) | |
irb(main):019:1> "#{a}-#{b}" | |
irb(main):020:1> end | |
=> :foo | |
irb(main):021:0> [1,2,3].map(&self.method(:foo).to_proc.curry[2]) | |
=> ["2-1", "2-2", "2-3"] |
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 | |
include Enumerable | |
def each(&block) | |
[].__send__(:each, &block) | |
rescue Exception | |
end | |
def more | |
to_a # any method from enumerable |
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 'ffi' | |
module Segfault | |
extend FFI::Library | |
ffi_lib 'ruby' | |
attach_function :rb_bug, [:string, :varargs], :void | |
end # Segfault | |
Segfault.rb_bug('%s', :string, 'test bug') |
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
# chruby-exec 2.1.2 -- ruby y.rb | |
{:a=>:foo} | |
# chruby-exec 2.1.3 -- ruby y.rb | |
y.rb:2: syntax error, unexpected modifier_if | |
a: if true; :foo; end | |
^ | |
y.rb:2: syntax error, unexpected keyword_end, expecting end-of-input |