Ruby In-Depth Reference

SkillAI & models

Once added, your AI can help you write, read, and explain Ruby code with in-depth knowledge of the language and its standard runtime (MRI/CRuby). It covers everything from objects, blocks, and control flow to metaprogramming, concurrency, and garbage collection.

Available today. Use it from your connected AI after setup.

Add the skill, then ask your AI Ruby questions or share code you want explained or improved.

Then ask your AI: use the Ruby In-Depth Reference skill

What your AI can do with it

  • Explain Ruby concepts like blocks, procs, lambdas, and exceptions
  • Apply metaprogramming techniques when writing Ruby code
  • Advise on concurrency with Threads, Fibers, and Ractors
  • Answer questions about the object model, core types, and garbage collection
  • Handle input, output, and encoding questions
  • Work with gems and Ruby tooling

What this skill tells your AI

The instructions your AI receives, as published by carapace-sh/carapace-bin in skills/ruby/SKILL.md and read by ahel’s review.

Comprehensive reference for the Ruby programming language and its reference implementation (MRI/CRuby) — covering the object model, metaprogramming, core types, control flow, I/O and encoding, concurrency, garbage collection, the RubyGems/Bundler package system, the interpreter CLI and tooling, environment variables, and the standard library.

Data Flow

Source file (.rb)
  → Ripper (parse to AST)
    → YARV compiler (compile AST to bytecode instructions)
      → YARV VM (per-instruction dispatch)
        → runtime services (ObjectSpace, GC, Thread scheduler, load path)
          → I/O, exit

Sub-Resources

Load the reference that matches your task. When in doubt, load multiple references.

KeywordsReference
object model, class, module, BasicObject, Object, Kernel, ancestor, method lookup, eigenclass, singleton class, superclass, super, included, prepended, inherited, ancestors, const_get, constants, autoload, refine, using, Module vs Class, instance variable, class variable, @@, constant resolution, toplevel, ::, ObjectSpace.each_object, method_missingreferences/object-model.md
metaprogramming, define_method, class_eval, instance_eval, module_eval, eval, Binding, send, send, public_send, respond_to?, method, method_missing, method_added, Refinements, refine, using, Module.new, Class.new, remove_method, undef_method, alias_method, attr_accessor, attr_reader, attr_writer, define_singleton_method, const_set, trace_point, TracePoint, set_trace_func, caller, caller_locationsreferences/metaprogramming.md
String, Symbol, Integer, Float, Numeric, Rational, Complex, BigDecimal, Array, Hash, Range, Regexp, MatchData, Proc, Method, nil, NilClass, true, false, TrueClass, FalseClass, Boolean, truthiness, eql?, equal?, ==, ===, <=>, Comparable, freeze, frozen?, immutability, dup, clone, deep_copy, hash, inspect, to_s, to_str, coercereferences/types.md
block, yield, proc, lambda, Proc, Method, method(:foo), to_proc, &block, ampersand, &, proc call, lambda call, return in block, return in lambda, argument strictness, arity, curry, splat, double splat, **, block_given?, &method(:foo), proc vs lambdareferences/blocks-procs-lambdas.md
if, unless, case, when, while, until, for, loop, break, next, redo, retry, throw, catch, raise, begin, rescue, ensure, else, Exception, StandardError, RuntimeError, custom exception, rescue modifier, rescue chain, $!, $@, $ERROR_INFO, retry, else clause, failreferences/control-flow.md
IO, File, StringIO, File::open, File.open, IO.foreach, IO.read, IO.write, Encoding, String#encode, Encoding.default_external, Encoding.default_internal, magic comment, # encoding, # coding, # frozen_string_literal, external encoding, internal encoding, transcoding, binary mode, text mode, STDIN, STDOUT, STDERR, ARGF, ARGV, open, File.read, File.write, flock, IO.select, pipe, IO.pipe, io/nonblockreferences/io-encoding.md
Thread, Fiber, Ractor, GVL, GIL, Mutex, ConditionVariable, Queue, SizedQueue, Thread::SizedQueue, Thread::Mutex, Thread::Queue, Thread.group, Thread.list, Thread.current, Thread.main, Thread.pass, Fiber.new, Fiber.resume, Fiber.yield, Fiber.schedule, scheduler, non-blocking, concurrent-ruby, async, Async, actor, Ractor.new, Ractor.receive, Ractor.send, Ractor.yield, Thread.pool, Thread.abort_on_exception, thread variable, Thread.current[:name], GVL releasereferences/concurrency.md
ObjectSpace, ObjectSpace.each_object, ObjectSpace.define_finalizer, ObjectSpace._id2ref, GC, GC.start, GC.stat, GC.disable, GC.enable, GC.stress, generational GC, RGENGC, write barrier, weak reference, WeakRef, WeakMap, ObjectSpace::WeakMap, finalizer, _id2ref, VALUE, immediate value, tagged pointer, RVALUE, RSTRING, memory layout, object shape, shape pool, frozen heap, malloc/freereferences/gc-memory.md
RubyGems, gem, gem install, gem list, gem uninstall, gem update, gem env, gem which, gemspec, Gem::Specification, Gemfile, Gemfile.lock, Bundler, bundle, bundle install, bundle update, bundle exec, bundle config, bundle add, bundle outdated, bundle lock, bundle check, bundle clean, bundle open, bundle binstubs, groups, :development, :test, :production, source, rubygems.org, git source, path source, BUNDLE_GEMFILE, Gemfile.lock, vendor/cache, Gem::Version, Gem::Requirementreferences/gems-bundler.md
ruby, ruby interpreter, ruby flag, -e, -I, -r, -n, -p, -a, -F, -l, -0, -K, -E, -w, -W, -d, --enable-gems, --disable-gems, --enable-frozen-string-literal, --disable-frozen-string-literal, irb, .irbrc, binding.irb, erb, ERB, Rake, Rakefile, rake task, rake file task, rake namespace, rake multitask, rake rule, rdoc, ri, RDoc, RDoc::Markup, ripper, ruby-prof, stackprof, memory_profiler, debug, debug.rb, byebug, rdbg, rbs, typeprof, rubocop, standard, ruby version manager, rvm, rbenv, chruby, asdfreferences/cli.md
environment variable, RUBYOPT, RUBYLIB, RUBY_ENGINE, RUBY_VERSION, RUBY_PLATFORM, RUBY_PATCHLEVEL, RUBY_RELEASE_DATE, RUBY_DESCRIPTION, GEM_HOME, GEM_PATH, GEM_ROOT, GEM_RC, BUNDLE_GEMFILE, BUNDLE_PATH, BUNDLE_FROZEN, BUNDLE_JOBS, BUNDLE_WITHOUT, BUNDLE_BIN, BUNDLE_IGNORE_CONFIG, RUBY_CONFIGURE_OPTS, BUNDLER_VERSION, BUNDLE_CACHE_PATH, PATH modifications, rubyopt parsing, frozen-string-literal defaultreferences/environment.md
standard library, stdlib, set, monitor, singleton, forwardable, delegate, observer, logger, optparse, fileutils, pathname, tempfile, tmpdir, json, yaml, psych, csv, erb, digest, securerandom, time, date, matrix, tsort, pp, prettyprint, benchmark, debug_inspector, objspace, io/console, io/nonblock, socket, openssl, net/http, net/smtp, net/pop, net/imap, uri, cgireferences/stdlib.md

Quick Guide

Cross-Project References

  • For Rails CLI development (commands, generators, database tasks), use the rails skill (in this repo).
  • For carapace library development (Action API, traverse engine, shell formatters), use the carapace-dev skill (in this repo).
  • For carapace user-facing integration (specs, macros, setup), use the carapace skill (in this repo).
  • For the official Ruby language reference and C-API, see https://ruby-doc.org/ — this skill covers the language and runtime model, not the C extension API.
  • For the RubySpec (executable spec suite that defines conformance), see https://github.com/ruby/spec.

Signals

GitHub stars
2k
Forks
145
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
ruby
Source
github.com/carapace-sh/carapace-bin