From 496b075a5fd3fdc370e20a730e086079e5a35c27 Mon Sep 17 00:00:00 2001 From: Alex Woods Date: Wed, 31 Jul 2024 08:47:31 -0700 Subject: [PATCH] Remove to_s from union unknown --- .../rails_json/lib/rails_json/types.rb | 16 ---------------- .../white_label/lib/white_label/types.rb | 4 ---- .../codegen/generators/types/UnionGenerator.java | 4 ---- 3 files changed, 24 deletions(-) diff --git a/codegen/projections/rails_json/lib/rails_json/types.rb b/codegen/projections/rails_json/lib/rails_json/types.rb index c3f783dc7..f78391aef 100644 --- a/codegen/projections/rails_json/lib/rails_json/types.rb +++ b/codegen/projections/rails_json/lib/rails_json/types.rb @@ -1990,10 +1990,6 @@ def initialize(name:, value:) def to_h { unknown: super(__getobj__) } end - - def to_s - "#" - end end end @@ -2489,10 +2485,6 @@ def initialize(name:, value:) def to_h { unknown: super(__getobj__) } end - - def to_s - "#" - end end end @@ -3390,10 +3382,6 @@ def initialize(name:, value:) def to_h { unknown: super(__getobj__) } end - - def to_s - "#" - end end end @@ -3424,10 +3412,6 @@ def initialize(name:, value:) def to_h { unknown: super(__getobj__) } end - - def to_s - "#" - end end end diff --git a/codegen/projections/white_label/lib/white_label/types.rb b/codegen/projections/white_label/lib/white_label/types.rb index bea8a9baa..4de411bc8 100644 --- a/codegen/projections/white_label/lib/white_label/types.rb +++ b/codegen/projections/white_label/lib/white_label/types.rb @@ -1202,10 +1202,6 @@ def initialize(name:, value:) def to_h { unknown: super(__getobj__) } end - - def to_s - "#" - end end end diff --git a/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/generators/types/UnionGenerator.java b/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/generators/types/UnionGenerator.java index df0bb69a8..8cacdbd5d 100644 --- a/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/generators/types/UnionGenerator.java +++ b/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/generators/types/UnionGenerator.java @@ -78,10 +78,6 @@ public void render() { .openBlock("def to_h") .write("{ unknown: super(__getobj__) }") .closeBlock("end") - .write("") - .openBlock("def to_s") - .write("\"#<$L::Types::Unknown #{__getobj__ || 'nil'}>\"", settings.getModule()) - .closeBlock("end") .closeBlock("end") .closeBlock("end\n"); });