From 108893fb8bfc0d7c7534d13a2e9bbc1fcf3af825 Mon Sep 17 00:00:00 2001 From: "jeff.tang" <163pc@163.com> Date: Tue, 24 Sep 2024 16:03:23 +0800 Subject: [PATCH] Update graphql_java_gen.rb Fixed: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead. --- codegen/lib/graphql_java_gen.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codegen/lib/graphql_java_gen.rb b/codegen/lib/graphql_java_gen.rb index dd91187..fa2212b 100644 --- a/codegen/lib/graphql_java_gen.rb +++ b/codegen/lib/graphql_java_gen.rb @@ -47,7 +47,7 @@ class << self private def erb_for(template_filename) - erb = ERB.new(File.read(template_filename), nil, '-') + erb = ERB.new(File.read(template_filename), trim_mode: '-') erb.filename = template_filename erb end @@ -58,7 +58,7 @@ def erb_for(template_filename) def erb_for_entity(template) template_filename = File.expand_path("../graphql_java_gen/templates/#{template}.erb", __FILE__) - erb = ERB.new(File.read(template_filename), nil, '-') + erb = ERB.new(File.read(template_filename), trim_mode: '-') erb.filename = template_filename erb end