Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renames BlackHole to Vanish for consistency #820

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/phlex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

module Phlex
autoload :ArgumentError, "phlex/errors/argument_error"
autoload :BlackHole, "phlex/black_hole"
autoload :Vanish, "phlex/vanish"
autoload :CSV, "phlex/csv"
autoload :Callable, "phlex/callable"
autoload :Context, "phlex/context"
Expand Down
4 changes: 2 additions & 2 deletions lib/phlex/sgml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ def vanish(*args)
return unless block_given?

if args.length > 0
@_context.capturing_into(Phlex::BlackHole) { yield(*args) }
@_context.capturing_into(Phlex::Vanish) { yield(*args) }
else
@_context.capturing_into(Phlex::BlackHole) { yield(self) }
@_context.capturing_into(Phlex::Vanish) { yield(self) }
end

nil
Expand Down
2 changes: 1 addition & 1 deletion lib/phlex/black_hole.rb → lib/phlex/vanish.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# @api private
module Phlex::BlackHole
module Phlex::Vanish
extend self

def <<(anything)
Expand Down