Skip to content

Instantly share code, notes, and snippets.

@tmiller
tmiller / playground.rs
Created November 25, 2017 02:59 — forked from anonymous/playground.rs
Rust code shared from the playground
enum Expr {
Val(i32),
Div(Box<Expr>, Box<Expr>),
}
fn eval(expr: Expr) -> Option<i32> {
match expr {
Expr::Val(x) => Some(x),
Expr::Div(x, y) => {
let x = eval(*x)?;
require File.dirname(__FILE__) + '/../test_helper'
class RangeTest < Test::Unit::TestCase
test <<-TEST do
Range#coinsides_with?
|
|
TEST
range = Time.zone.now..Time.zone.now
require 'action_mailer'
require 'mail'
module ActionMailer
class TestCase
def set_expected_mail
@expected = Mail.new
@expected.content_type = "text/plain; charset=#{charset}"
@expected.mime_version = '1.0'