repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/inflections.rb | config/initializers/inflections.rb | # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflec... | ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/kaminari_config.rb | config/initializers/kaminari_config.rb | Kaminari.configure do |config|
config.default_per_page = 30
# config.max_per_page = nil
config.window = 2
config.outer_window = 2
# config.left = 0
# config.right = 0
# config.page_method_name = :page
# config.param_name = :page
# config.params_on_first_page = false
end
| ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/cookies_serializer.rb | config/initializers/cookies_serializer.rb | # Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
Rails.application.config.action_dispatch.cookies_serializer = :json
| ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/permissions_policy.rb | config/initializers/permissions_policy.rb | # Be sure to restart your server when you modify this file.
# Define an application-wide HTTP permissions policy. For further
# information see: https://developers.google.com/web/updates/2018/06/feature-policy
# Rails.application.config.permissions_policy do |policy|
# policy.camera :none
# policy.gyroscope ... | ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/exception-track.rb | config/initializers/exception-track.rb | require "exception_notification/sidekiq"
ExceptionTrack.configure do
# self.environments = %i(production)
end
ExceptionNotification.configure do |config|
config.ignored_exceptions += %w[
ActionView::TemplateError
ActionController::InvalidAuthenticityToken
ActionController::BadRequest
ActionView::M... | ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/_setup_mailer.rb | config/initializers/_setup_mailer.rb | Rails.application.config.to_prepare do
ActionMailer::Base.default_url_options = { host: Setting.domain, protocol: Setting.protocol }
end
| ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/assets.rb | config/initializers/assets.rb | # Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = "1.0"
# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
# Precompile additional... | ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/notifications.rb | config/initializers/notifications.rb | # notifications Config
Notifications.configure do
# Class name of you User model, default: 'User'
# self.user_class = 'User'
# Method of user name in User model, default: 'name'
self.user_name_method = "login"
# Method of user avatar in User model, default: nil
self.user_avatar_url_method = "large_avatar_... | ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/carrierwave.rb | config/initializers/carrierwave.rb | require "carrierwave"
require "carrierwave/validations/active_model"
class NullStorage
attr_reader :uploader
def initialize(uploader)
@uploader = uploader
end
def identifier
uploader.filename
end
def store!(_file)
true
end
def retrieve!(_identifier)
true
end
end
Rails.application... | ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/twemoji.rb | config/initializers/twemoji.rb | require "twemoji/svg"
Twemoji.configure do |config|
config.asset_root = ENV["TWEMOJI_ASSET_ROOT"] || "https://twemoji.ruby-china.com/2"
config.file_ext = "svg"
config.class_name = "twemoji"
end
| ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/request_forgery_protection.rb | config/initializers/request_forgery_protection.rb | # Be sure to restart your server when you modify this file.
# Enable origin-checking CSRF mitigation.
Rails.application.config.action_controller.forgery_protection_origin_check = true
| ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/rucaptcha.rb | config/initializers/rucaptcha.rb | redis_config = Rails.application.config_for(:redis)
RuCaptcha.configure do
self.cache_store = [:redis_cache_store, { namespace: "rucaptcha", url: redis_config["url"], expires_in: 1.day }]
end
Recaptcha.configure do |config|
config.api_server_url = "https://recaptcha.net/recaptcha/api.js"
config.verify_url = "htt... | ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/backtrace_silencers.rb | config/initializers/backtrace_silencers.rb | # Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
# You can also remove all the silencers if you're trying to debug a ... | ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/mime_types.rb | config/initializers/mime_types.rb | # Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
| ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/per_form_csrf_tokens.rb | config/initializers/per_form_csrf_tokens.rb | # Be sure to restart your server when you modify this file.
# Enable per-form CSRF tokens.
Rails.application.config.action_controller.per_form_csrf_tokens = true
| ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/initializers/cors.rb | config/initializers/cors.rb | # Be sure to restart your server when you modify this file.
# Avoid CORS issues when API is called from the frontend app.
# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests.
# Read more: https://github.com/cyu/rack-cors
Rails.application.config.middleware.insert_before 0, Rac... | ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/environments/test.rb | config/environments/test.rb | # The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
Rails.application.configure do
# Settings... | ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/environments/development.rb | config/environments/development.rb | require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Make code changes take effect immediately without server restart.
config.enable_reloading = true
# Do not eager load code on boot.
config.eager... | ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
ruby-china/homeland | https://github.com/ruby-china/homeland/blob/9f5dbde5b7ce92b72bfdfb14622a784a2805e412/config/environments/production.rb | config/environments/production.rb | require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.enable_reloading = false
# Eager load code on boot for better performance and memory savings (ignor... | ruby | MIT | 9f5dbde5b7ce92b72bfdfb14622a784a2805e412 | 2026-01-04T15:48:23.006961Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/tasks/linter.rb | tasks/linter.rb | # frozen_string_literal: true
#
# Common stuff for a linter
#
module LinterMixin
def run
offenses = []
applicable_files.each do |file|
if clean?(file)
print "."
else
offenses << file
print "F"
end
end
print "\n"
return if offenses.empty?
raise fai... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/docker/manager.rb | docker/manager.rb | # frozen_string_literal: true
require "faraday"
require "yaml"
require "open3"
module Docker
#
# Manages byebug docker images
#
class Manager
VERSIONS = %w[
3.2.9
3.3.9
].freeze
COMPILERS = %w[
gcc
clang
].freeze
attr_reader :version, :compiler
def initialize... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/runner_against_program_with_byebug_call_test.rb | test/runner_against_program_with_byebug_call_test.rb | # frozen_string_literal: true
require_relative "test_helper"
module Byebug
#
# Tests standalone byebug when debugging a target program
#
class RunnerAgainstProgramWithByebugCallTest < TestCase
def setup
super
example_file.write("require 'byebug'\nbyebug\nsleep 0")
example_file.close
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/runner_without_target_program_test.rb | test/runner_without_target_program_test.rb | # frozen_string_literal: true
require_relative "test_helper"
require "byebug/version"
module Byebug
#
# Tests standalone byebug when flags that require no target program are used
#
class RunnerWithoutTargetProgramTest < TestCase
def test_run_with_version_flag
stdout = run_byebug("--version")
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/interface_test.rb | test/interface_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# A subclass of Interface to test the base class functionality
#
class SpecificInterface < Interface
attr_accessor :fake_input_queue
def readline(_prompt)
@fake_input_queue.pop
end
end
#
# Tests the Interface class
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/remote_shortcut_test.rb | test/remote_shortcut_test.rb | # frozen_string_literal: true
require_relative "test_helper"
require_relative "support/remote_debugging_tests"
module Byebug
#
# Tests the remote debugging shortcut.
#
class RemoteShortcutTest < TestCase
include RemoteDebuggingTests
def program
strip_line_numbers <<-RUBY
1: require "b... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/debugger_alias_test.rb | test/debugger_alias_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests that the old "debugger" kernel method still works. It will be
# eventually removed.
#
class DebuggerAliasTest < Minitest::Test
def test_aliases_debugger_to_byebug
assert_equal Kernel.method(:byebug), Kernel.method(:debugge... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/test_helper.rb | test/test_helper.rb | # frozen_string_literal: true
require "support/test_case"
Byebug::TestCase.before_suite
| ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/post_mortem_test.rb | test/post_mortem_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests post mortem functionality.
#
class PostMortemTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test post mortem functionality
4: #
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/minitest_runner.rb | test/minitest_runner.rb | # frozen_string_literal: true
$LOAD_PATH.unshift(File.expand_path(File.join("..", "lib"), __dir__))
$LOAD_PATH.unshift(__dir__)
require "minitest"
require "English"
require "shellwords"
require "timeout"
module Byebug
#
# Helper class to aid running minitest
#
class MinitestRunner
def initialize
Mi... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/remote_debugging_test.rb | test/remote_debugging_test.rb | # frozen_string_literal: true
require_relative "test_helper"
require_relative "support/remote_debugging_tests"
module Byebug
#
# Tests remote debugging functionality.
#
class RemoteDebuggingTest < TestCase
include RemoteDebuggingTests
def program
strip_line_numbers <<-RUBY
1: require ... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/runner_against_valid_program_test.rb | test/runner_against_valid_program_test.rb | # frozen_string_literal: true
require_relative "test_helper"
require "byebug/version"
module Byebug
#
# Tests standalone byebug when debugging a target program
#
class RunnerAgainstValidProgramTest < TestCase
def setup
super
example_file.write("sleep 0")
example_file.close
end
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/minitest_runner_test.rb | test/minitest_runner_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
class MinitestRunnerTest < TestCase
def test_runs
output = run_minitest_runner("test/debugger_alias_test.rb")
assert_includes output, "\n.\n"
end
def test_per_test_class
output = run_minitest_runner("DebuggerAliasTest"... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/rc_test.rb | test/rc_test.rb | # frozen_string_literal: true
require_relative "test_helper"
require "byebug/runner"
module Byebug
class RcTest < TestCase
def setup
super
example_file.write("sleep 0")
example_file.close
end
def test_run_with_no_rc_option
with_command_line("exe/byebug", "--no-rc", example_path... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/changelog_test.rb | test/changelog_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests sanity of changelog file.
#
class ChangelogTest < Minitest::Test
def test_has_definitions_for_all_releases
changelog.scan(/\[([0-9]+\.[0-9]+\.[0-9]+)\] /).flatten.uniq.each do |release_version|
assert_match %r{^\[#{r... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/support/remote_debugging_tests.rb | test/support/remote_debugging_tests.rb | # frozen_string_literal: true
require "test_helper"
require "open3"
module Byebug
#
# Tests remote debugging functionality.
#
module RemoteDebuggingTests
def test_connecting_to_remote_debugger
write_program(program)
remote_debug_and_connect("quit!")
check_output_includes \
"Con... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/support/test_case.rb | test/support/test_case.rb | # frozen_string_literal: true
ENV["MT_NO_PLUGINS"] = "yes, no plugins"
require "minitest"
require "byebug"
require "byebug/core"
require "byebug/interfaces/test_interface"
require_relative "utils"
module Byebug
#
# Extends Minitest's base test case and provides defaults for all tests.
#
class TestCase < Mini... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/support/matchers.rb | test/support/matchers.rb | # frozen_string_literal: true
require "support/assertions"
module Byebug
#
# Some custom matches for byebug's output
#
module TestMatchers
def check_output_includes(*args)
check_stream(:assert_includes_in_order, interface.output, *args)
end
def check_error_includes(*args)
check_stream... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/support/assertions.rb | test/support/assertions.rb | # frozen_string_literal: true
require "minitest/mock"
module Minitest
#
# Custom Minitest assertions
#
module Assertions
#
# Checks that a given collection is included in another collection
# and in correct order. It accepts both strings and regexps as elements of
# the arrays.
#
# @pa... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/support/utils.rb | test/support/utils.rb | # frozen_string_literal: true
require "support/matchers"
require "support/temporary"
require "open3"
module Byebug
#
# Misc tools for the test suite
#
module TestUtils
include TestMatchers
include TestTemporary
#
# Adds commands to the input queue, so they will be later retrieved by
# Pro... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/support/temporary.rb | test/support/temporary.rb | # frozen_string_literal: true
module Byebug
#
# Some custom matches for changing stuff temporarily during tests
#
module TestTemporary
#
# Yields a block using temporary values for command line program name and
# command line arguments.
#
# @param program_name [String] New value for the pro... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/support/reline.rb | test/support/reline.rb | # frozen_string_literal: true
require "reline"
new_io_gate = Reline::Dumb.new(encoding: Encoding::UTF_8)
Reline.send(:remove_const, "IOGate")
Reline.const_set("IOGate", new_io_gate)
| ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/printers/plain_test.rb | test/printers/plain_test.rb | # frozen_string_literal: true
require_relative "../test_helper"
require "minitest/mock"
require "byebug/helpers/string"
module Byebug
#
# Tests the plain text printer
#
class PrintersPlainTest < TestCase
include Helpers::StringHelper
def klass
@klass ||= Printers::Plain
end
def printer... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/helpers/bin_helper_test.rb | test/helpers/bin_helper_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
module Helpers
class BinHelperTest < Minitest::Test
include BinHelper
def test_which_resolves_ruby
assert_equal true, File.exist?(which("ruby"))
end
end
end
end
| ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/frame_test.rb | test/commands/frame_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests commands which show frames
#
class FrameTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test backtraces.
4: #
5: class ... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/delete_test.rb | test/commands/delete_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests deleting breakpoints.
#
class DeleteTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test breakpoints
4: #
5: class #{example... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/break_test.rb | test/commands/break_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests adding breakpoints to methods
#
class BreakAtMethodsTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test breakpoints
4: #
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/eval_test.rb | test/commands/eval_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests expression evaluation.
#
class EvalTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: Foo = "Foo constant"
3: foo = :foo_variable
4: byebug
5: e... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/restart_test.rb | test/commands/restart_test.rb | # frozen_string_literal: true
require "test_helper"
require "rbconfig"
require "minitest/mock"
module Byebug
#
# Tests restarting functionality.
#
class RestartTest < TestCase
def test_restart_with_no_args_original_script_with_no_args_standalone_mode
with_mode(:standalone) do
with_command_li... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/step_test.rb | test/commands/step_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests basic stepping behaviour.
#
class BasicSteppingTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test stepping.
4: #
5: c... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/where_test.rb | test/commands/where_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests commands which deal with backtraces.
#
class WhereStandardTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test backtraces.
4: #
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/var_test.rb | test/commands/var_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests variable evaluation.
#
class VarTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test variable evaluation.
4: #
5: class... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/disable_test.rb | test/commands/disable_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests disabling breakpoints.
#
class DisableTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test breakpoints
4: #
5: class #{... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/source_test.rb | test/commands/source_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests reading Byebug commands from a file.
#
class SourceTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: byebug
3:
4: a = 2
5: a + 3
6: end
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/continue_test.rb | test/commands/continue_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests for continue command
#
class ContinueTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test continue command.
4: #
5: cla... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/help_test.rb | test/commands/help_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests help command without arguments
#
class HelpAloneTest < TestCase
def setup
super
enter "help"
debug_code(minimal_program)
end
{
break: "Sets breakpoints in the source code",
catch: "Handles e... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/irb_test.rb | test/commands/irb_test.rb | # frozen_string_literal: true
require "test_helper"
require "minitest/mock"
require "irb"
module Byebug
#
# Tests entering IRB from within Byebug.
#
class IrbTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: byebug
3:
4: a = 2
5... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/history_test.rb | test/commands/history_test.rb | # frozen_string_literal: true
require "test_helper"
unless ENV["LIBEDIT"]
module Byebug
#
# Tests Byebug's command line history.
#
class HistoryTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: byebug
3:
4: a = 2
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/next_test.rb | test/commands/next_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests basic stepping behaviour.
#
class BasicNextTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test stepping.
4: #
5: class... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/method_test.rb | test/commands/method_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests commands for listing available methods.
#
class MethodTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test the method command.
4: #... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/quit_test.rb | test/commands/quit_test.rb | # frozen_string_literal: true
require "test_helper"
require "minitest/mock"
module Byebug
#
# Tests exiting Byebug functionality.
#
class QuitTest < TestCase
def faking_exit!
Process.stub(:exit!, nil) { yield }
end
def test_quit_finishes_byebug_if_user_confirms
faking_exit! do
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/catch_test.rb | test/commands/catch_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests exception catching
#
class CatchTest < TestCase
def test_catch_adds_catchpoints
enter "catch NoMethodError"
debug_code(minimal_program)
assert_equal 1, Byebug.catchpoints.size
end
def test_catch_removes... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/condition_test.rb | test/commands/condition_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests adding conditions to breakpoints.
#
class ConditionTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: byebug
3:
4: b = 5
5: c = b + 5
6: c ... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/untracevar_test.rb | test/commands/untracevar_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests gloabal variable untracing functionality.
#
class UntracevarTest < TestCase
def test_untracevar_help
enter "help untracevar"
debug_code(minimal_program)
check_output_includes "Stops tracing a global variable."
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/enable_test.rb | test/commands/enable_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests enabling breakpoints.
#
class EnableTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test breakpoints
4: #
5: class #{ex... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/set_test.rb | test/commands/set_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Test settings functionality.
#
class SetTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: byebug
3:
4: z = 4
5: z += 1
6: z + 1
7: end
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/debug_test.rb | test/commands/debug_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests launching new debuggers from byebug's prompt
#
class SubdebuggersTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test subdebuggers inside evaluat... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/pry_test.rb | test/commands/pry_test.rb | # frozen_string_literal: true
require "pry"
require "test_helper"
require "minitest/mock"
module Byebug
#
# Tests entering Pry from within Byebug.
#
class PryTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: byebug
3:
4: a = 2
5... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/up_test.rb | test/commands/up_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests the +up+ command.
#
class UpTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test backtraces.
4: #
5: class #{example_cl... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/down_test.rb | test/commands/down_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests commands which deal with backtraces.
#
class DownTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test backtraces.
4: #
5: ... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/display_test.rb | test/commands/display_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests displaying values of expressions on every stop.
#
class DisplayTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: d = 0
3:
4: byebug
5:
6: d +... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/tracevar_test.rb | test/commands/tracevar_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests gloabal variable tracing functionality.
#
class TracevarTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test global variable tracing
4... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/thread_test.rb | test/commands/thread_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests threading functionality.
#
class ThreadTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test threading
4: #
5: class #{e... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/list_test.rb | test/commands/list_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests for listing source files.
#
class ListTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test breakpoints
4: #
5: class #{... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/edit_test.rb | test/commands/edit_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests file editing from within Byebug.
#
class EditTest < TestCase
def test_edit_opens_current_file_in_current_line_in_configured_editor
with_env("EDITOR", "edi") do
assert_calls(Kernel, :system, "edi +4 #{example_path}") ... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/interrupt_test.rb | test/commands/interrupt_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests interrupt command.
#
class InterruptTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: byebug
3:
4: ex = 0
5:
6: 1.times do
7: ... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/skip_test.rb | test/commands/skip_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests for continue command
#
class SkipTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test continue_breakpoint command.
4: #
5:... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/finish_test.rb | test/commands/finish_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests +finish+ functionality when it needs to stop after method return
# events.
#
class FinishAfterReturnTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy cl... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/show_test.rb | test/commands/show_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Test settings display functionality.
#
class ShowTest < TestCase
settings =
%i[autolist autosave basename fullpath post_mortem stack_on_error]
settings.each do |set|
define_method(:"test_show_#{set}_shows_disabled_bool_... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/save_test.rb | test/commands/save_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests saving Byebug commands to a file.
#
class SaveTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: byebug
3: a = 2
4: a + 3
5: end
RUBY
end
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/undisplay_test.rb | test/commands/undisplay_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests undisplay command used to stop periodically displaying expressions.
#
class UndisplayTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: d = 0
3:
4: byebug
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/info_test.rb | test/commands/info_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Test info command.
#
class InfoTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test information about files.
4: #
5: class #{... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/commands/kill_test.rb | test/commands/kill_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Test signal sending functionality.
#
class KillTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: #
3: # Toy class to test signals
4: #
5: class #{e... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/interfaces/local_interface_test.rb | test/interfaces/local_interface_test.rb | # frozen_string_literal: true
require "test_helper"
require "minitest/mock"
module Byebug
#
# Tests the local interface
#
class LocalInterfaceTest < TestCase
def test_continues_by_control_d
# `Reline.readline` returns nil for Control-D
Reline.stub(:readline, nil) do
interface = LocalIn... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/interfaces/script_interface_test.rb | test/interfaces/script_interface_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests the script interface (batch execution of byebug commands from a file)
#
class ScriptInterfaceTest < TestCase
def test_initialize_wires_up_dependencies
with_new_tempfile("show") do |path|
interface = ScriptInterface.n... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/processors/command_processor_test.rb | test/processors/command_processor_test.rb | # frozen_string_literal: true
require "test_helper"
require "timeout"
module Byebug
#
# Tests generic input evaluation
#
class ProcessorBaseTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
2: byebug
3:
4: d = 1
5: d += 1
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/test/processors/script_processor_test.rb | test/processors/script_processor_test.rb | # frozen_string_literal: true
require "test_helper"
module Byebug
#
# Tests script processor in isolation
#
class ScriptProcessorTest < Minitest::Test
include TestUtils
def test_script_processor_clears_history
previous_history = Reline::HISTORY.to_a
process_rc_file("set callstyle long")
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/ext/byebug/extconf.rb | ext/byebug/extconf.rb | # frozen_string_literal: true
require "mkmf"
makefile_config = RbConfig::MAKEFILE_CONFIG
makefile_config["CC"] = ENV["CC"] if ENV["CC"]
makefile_config["CFLAGS"] << " -gdwarf-2 -g3 -O0" if ENV["debug"]
dir_config("ruby")
with_cflags(makefile_config["CFLAGS"]) { create_makefile("byebug/byebug") }
| ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/lib/byebug.rb | lib/byebug.rb | # frozen_string_literal: true
require_relative "byebug/attacher"
| ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/lib/byebug/command.rb | lib/byebug/command.rb | # frozen_string_literal: true
require "forwardable"
require_relative "helpers/string"
module Byebug
#
# Parent class of all byebug commands.
#
# Subclass it and name the subclass ending with the word Command to implement
# your own custom command.
#
# @example Define a custom command
#
# class MyCus... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/lib/byebug/core.rb | lib/byebug/core.rb | # frozen_string_literal: true
require_relative "helpers/reflection"
require "byebug/byebug"
require_relative "context"
require_relative "breakpoint"
require_relative "interface"
require_relative "processors/script_processor"
require_relative "processors/post_mortem_processor"
require_relative "commands"
require_relati... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/lib/byebug/version.rb | lib/byebug/version.rb | # frozen_string_literal: true
#
# Reopen main module to define the library version
#
module Byebug
VERSION = "12.0.0"
end
| ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/lib/byebug/errors.rb | lib/byebug/errors.rb | # frozen_string_literal: true
module Byebug
#
# Custom exception exception to signal "command not found" errors
#
class CommandNotFound < NoMethodError
def initialize(input, parent = nil)
@input = input
@parent = parent
super("Unknown command '#{name}'. Try '#{help}'")
end
priva... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/lib/byebug/breakpoint.rb | lib/byebug/breakpoint.rb | # frozen_string_literal: true
module Byebug
#
# Implements breakpoints
#
class Breakpoint
#
# First breakpoint, in order of creation
#
def self.first
Byebug.breakpoints.first
end
#
# Last breakpoint, in order of creation
#
def self.last
Byebug.breakpoints.last
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/lib/byebug/command_list.rb | lib/byebug/command_list.rb | # frozen_string_literal: true
require_relative "errors"
module Byebug
#
# Holds an array of subcommands for a command
#
class CommandList
include Enumerable
def initialize(commands)
@commands = commands.sort_by(&:to_s)
end
def match(input)
find { |cmd| cmd.match(input) }
end
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/lib/byebug/frame.rb | lib/byebug/frame.rb | # frozen_string_literal: true
require_relative "helpers/file"
module Byebug
#
# Represents a frame in the stack trace
#
class Frame
include Helpers::FileHelper
attr_reader :pos
def initialize(context, pos)
@context = context
@pos = pos
end
def file
@context.frame_file(... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/lib/byebug/subcommands.rb | lib/byebug/subcommands.rb | # frozen_string_literal: true
require "forwardable"
require_relative "helpers/reflection"
require_relative "command_list"
module Byebug
#
# Subcommand additions.
#
module Subcommands
def self.included(command)
command.extend(ClassMethods)
end
extend Forwardable
def_delegators "self.cla... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/lib/byebug/interface.rb | lib/byebug/interface.rb | # frozen_string_literal: true
require_relative "setting"
require_relative "history"
require_relative "helpers/file"
#
# Namespace for all of byebug's code
#
module Byebug
#
# Main Interface class
#
# Contains common functionality to all implemented interfaces.
#
class Interface
include Helpers::FileHe... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/lib/byebug/source_file_formatter.rb | lib/byebug/source_file_formatter.rb | # frozen_string_literal: true
require_relative "helpers/file"
require_relative "setting"
module Byebug
#
# Formats specific line ranges in a source file
#
class SourceFileFormatter
include Helpers::FileHelper
attr_reader :file, :annotator
def initialize(file, annotator)
@file = file
... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/lib/byebug/runner.rb | lib/byebug/runner.rb | # frozen_string_literal: true
require "optparse"
require "English"
require_relative "core"
require_relative "version"
require_relative "helpers/bin"
require_relative "helpers/parse"
require_relative "helpers/string"
require_relative "option_setter"
require_relative "processors/control_processor"
module Byebug
#
#... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
deivid-rodriguez/byebug | https://github.com/deivid-rodriguez/byebug/blob/994848cd3b20ff6218d73f790ab7afbaed92358e/lib/byebug/commands.rb | lib/byebug/commands.rb | # frozen_string_literal: true
require_relative "commands/break"
require_relative "commands/catch"
require_relative "commands/condition"
require_relative "commands/continue"
require_relative "commands/debug"
require_relative "commands/delete"
require_relative "commands/disable"
require_relative "commands/display"
requi... | ruby | BSD-2-Clause | 994848cd3b20ff6218d73f790ab7afbaed92358e | 2026-01-04T15:50:47.976763Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.