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

Rename erb.so to erb/escape.so #35

Merged
merged 1 commit into from
Nov 24, 2022
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 Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ end

if RUBY_ENGINE != 'jruby'
require 'rake/extensiontask'
Rake::ExtensionTask.new('erb')
Rake::ExtensionTask.new('erb/escape')
task test: :compile
end

Expand Down
2 changes: 1 addition & 1 deletion erb.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
spec.platform = 'java'
else
spec.required_ruby_version = '>= 2.7.0'
spec.extensions = ['ext/erb/extconf.rb']
spec.extensions = ['ext/erb/escape/extconf.rb']
end

spec.add_dependency 'cgi', '>= 0.3.3'
Expand Down
2 changes: 1 addition & 1 deletion ext/erb/erb.c → ext/erb/escape/escape.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ erb_escape_html(VALUE self, VALUE str)
}

void
Init_erb(void)
Init_escape(void)
{
rb_cERB = rb_define_class("ERB", rb_cObject);
rb_mUtil = rb_define_module_under(rb_cERB, "Util");
Expand Down
2 changes: 2 additions & 0 deletions ext/erb/escape/extconf.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require 'mkmf'
create_makefile 'erb/escape'
2 changes: 0 additions & 2 deletions ext/erb/extconf.rb

This file was deleted.

2 changes: 1 addition & 1 deletion lib/erb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ module Util
#
begin
# ERB::Util.html_escape
require 'erb.so'
require 'erb/escape'
rescue LoadError
def html_escape(s)
CGI.escapeHTML(s.to_s)
Expand Down