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
| moved to https://github.com/ml/rack-contrib/blob/master/lib/rack/contrib/superlogger.rb |
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 'rubygems' | |
| require 'sinatra' | |
| require File.join(File.dirname(__FILE__), '..', 'lib', 'rakismet.rb') | |
| get '/' do | |
| %{<html><head><title>Rakismet</title></head><body> | |
| <form action="/posts" method="post"> | |
| <label for="comment_author">author</author> |
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
| > a = true; | |
| ?> b = false; | |
| ?> x = a and b; | |
| ?> x | |
| => true |
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 Hash | |
| def +(another) | |
| h = self.clone | |
| another.each do |k, v| | |
| if h.has_key? k | |
| h[k] += v | |
| else | |
| h[k] = v | |
| end | |
| end |
NewerOlder