File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed
Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -484,11 +484,7 @@ def build_version(node)
484484
485485 def build_platform ( node )
486486 hash = pairs_to_hash ( node )
487- if hash [ "value" ]
488- Gem ::Platform . new ( hash [ "value" ] )
489- else
490- Gem ::Platform . new ( [ hash [ "cpu" ] , hash [ "os" ] , hash [ "version" ] ] )
491- end
487+ Gem ::Platform . new ( [ hash [ "cpu" ] , hash [ "os" ] , hash [ "version" ] ] )
492488 end
493489
494490 def build_requirement ( node )
Original file line number Diff line number Diff line change @@ -933,14 +933,7 @@ def test_load_platform_from_value_field
933933 yaml = "!ruby/object:Gem::Platform\n value: x86-linux\n "
934934 plat = yaml_load ( yaml , permitted_classes : Gem ::SafeYAML ::PERMITTED_CLASSES )
935935 assert_kind_of Gem ::Platform , plat
936- if Gem . use_psych?
937- # Psych doesn't interpret the "value" field specially
938- assert_nil plat . cpu
939- else
940- # YAMLSerializer parses the "value" field as a platform string
941- assert_equal "x86" , plat . cpu
942- assert_equal "linux" , plat . os
943- end
936+ assert_nil plat . cpu
944937 end
945938
946939 def test_load_platform_from_cpu_os_version_fields
You can’t perform that action at this time.
0 commit comments