Skip to content

Replace erubi with stdlib ERB - #366

Merged
pcai merged 1 commit into
mainfrom
erubi-to-stdlib-erb
Sep 16, 2026
Merged

pcai merged 1 commit into
mainfrom
erubi-to-stdlib-erb

Conversation

@pcai

@pcai pcai commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

erb is part of the Ruby standard library (default gem since Ruby 3.2, which the gemspec already requires), so the third-party erubi gem is no longer needed.

ERB.new(template).result(b) is a drop-in replacement for b.eval(Erubi::Engine.new(template).src): evaluated in the same binding it returns the rendered template output.

Changes:

  • lib/winrm/psrp/message_factory.rb: require erubi -> erb; Erubi::Engine.new(template).src -> ERB.new(template).result(b)
  • winrm.gemspec: drop the erubi runtime dependency (no erb dependency needed, it is a default gem)

Mirrors the already-merged stdlib-ERB swaps in winrm-fs (#101) and winrm-elevated (#58).

erb is part of the Ruby standard library (default gem since Ruby 3.2, which the gemspec already requires), so the third-party erubi gem is no longer needed.

ERB.new(template).result(b) is a drop-in replacement for b.eval(Erubi::Engine.new(template).src): evaluated in the same binding it returns the rendered template output.
@pcai
pcai merged commit b0bf2ec into main Sep 16, 2026
11 checks passed
@pcai
pcai deleted the erubi-to-stdlib-erb branch September 16, 2026 22:26
@pcai

pcai commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

@Cyberwatch thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant