Skip to content

Commit

Permalink
Fixes block and proc definition to work with Ruby 3.0.0 (awesome-prin…
Browse files Browse the repository at this point in the history
  • Loading branch information
csalvato authored and obourdon committed Jan 26, 2023
1 parent b8f0e3c commit 193e377
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## master (unreleased)
- Fixes block and proc definition to work with Ruby 3.0.0 [@csalvato] - [#392]
- Removed check for Ruby 2.4 and earlier [@bryanh]
- Rails 5.0 builds are failing, because the sqlite3 version being installed is wrong version [#366]
- Fixes spec suite to properly work via travis, gets a clean build [@imajes, others]
Expand Down
4 changes: 2 additions & 2 deletions lib/awesome_print/formatters/base_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def indentation
inspector.current_indentation
end

def indented
inspector.increase_indentation(&Proc.new)
def indented(&block)
inspector.increase_indentation(&block)
end

def indent
Expand Down
4 changes: 2 additions & 2 deletions lib/awesome_print/inspector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def current_indentation
indentator.indentation
end

def increase_indentation
indentator.indent(&Proc.new)
def increase_indentation(&block)
indentator.indent(&block)
end

# Dispatcher that detects data nesting and invokes object-aware formatter.
Expand Down

0 comments on commit 193e377

Please sign in to comment.