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
# Orignal | |
module ActionController | |
class Responder | |
def to_format | |
if get? || !has_errors? || response_overridden? | |
default_render | |
else | |
display_errors | |
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
class Foo | |
public def my_public_method | |
1 + 2 | |
end | |
protected def my_protected_method | |
3 + 4 | |
end | |
def my_private_method |
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
NoMethodError (super: no superclass method `request_parameters'): | |
gems/gems/actionpack-3.2.13/lib/action_dispatch/http/request.rb:237:in `POST' | |
gems/gems/actionpack-3.2.13/lib/action_dispatch/http/parameters.rb:10:in `parameters' |
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 Couchbase | |
class AsyncCallback | |
include Java::NetSpyMemcachedInternal::OperationCompletionListener | |
def initialize(callback) | |
@callback = callback | |
end | |
def onComplete(future) |
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
$ sudo dpkg -i couchbase-server-enterprise_2.2.0_x86_64.deb | |
Selecting previously unselected package couchbase-server. | |
(Reading database ... 70796 files and directories currently installed.) | |
Unpacking couchbase-server (from couchbase-server-enterprise_2.2.0_x86_64.deb) ... | |
libssl1* is installed. Continue installing | |
Minimum RAM required : 4 GB | |
System RAM configured : 3145728 kB | |
Minimum number of processors required : 4 cores | |
Number of processors on the system : 32 cores | |
Setting up couchbase-server (2.2.0) ... |
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
# A | |
100.times do |i| | |
case [i % 3 == 0, i % 5 == 0] | |
when [true, true] then puts 'Fizz Buzz' | |
when [true, false] then puts 'Fizz' | |
when [false, true] then puts 'Buzz' | |
else | |
puts i | |
end | |
end |
OlderNewer