Skip to content

Instantly share code, notes, and snippets.

Ruby Association Certified Ruby Examination Gold Sample Questions

Q1. Assume that the following code must have the stated execution result.

__(1)__
x.each_line { |line| puts line }

[Execution Result]
apple

Ruby Association Certified Ruby Examination Silver Sample Questions

Q1. Which of the following have true values in Ruby? (Choose two.)

  • (a) ""
  • (b) 0
  • (c) false
  • (d) nil

#!/bin/sh
if [ -n "$(git status --porcelain)" ]; then
echo "\033[31;1mWorking directory needs to be clean\033[0m";
exit 1
else
git checkout production &&
git rebase develop &&
npm run build &&
git add -f dist &&
@mathiasbynens
mathiasbynens / web-platform-status-links.md
Last active April 16, 2024 02:54
Web platform status links
@janlelis
janlelis / terminal-ansi-colors-benchmark.md
Last active January 9, 2024 11:12
Terminal Colors Benchmark: paint, rainbow, term/ansicolor, pastel, ansi, hansi
require "benchmark/ips"
puts RUBY_DESCRIPTION
class Inherit < Struct.new(:id, :name, :age)
def name_and_age
"#{name}, #{age}"
end
end
@janlelis
janlelis / goto.patch
Created April 28, 2015 16:55
rvm install 2.2.2 -n goto --patch http://git.io/vfxF2
From 4787399d0ffc0c8e01747713e8da91de2257bcf5 Mon Sep 17 00:00:00 2001
From: Jan Lelis <mail@janlelis.de>
Date: Tue, 28 Apr 2015 18:52:53 +0200
Subject: [PATCH] activate goto in ruby
---
vm_opts.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vm_opts.h b/vm_opts.h
@janlelis
janlelis / rdoc2md
Last active August 29, 2015 14:17 — forked from teeparham/rdoc2md.rb
#!/usr/bin/env ruby
require 'rdoc'
puts RDoc::Markup::ToMarkdown.new.convert File.read(ARGV[0] || 'README.rdoc')
# ./rdoc2md > README.md
# ./rdoc2md ABC.rdoc > abc.md
@badboy
badboy / hello-world.rs
Last active October 31, 2023 08:56
Poor dev's Rust Compiler
fn main() {
println!("Hello World!");
}
@gbuesing
gbuesing / ml-ruby.md
Last active February 28, 2024 15:13
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby

Gems