{"version":"1.0","categories":["Ruby"],"height":"190","title":"\u3010Ruby\u3011\u914d\u5217\u306e\u548c\u96c6\u5408\u30fb\u7a4d\u96c6\u5408\u30fb\u5dee\u96c6\u5408\u3092\u6c42\u3081\u308b\u65b9\u6cd5","type":"rich","provider_url":"https://hatena.blog","blog_url":"https://ml-rand-note.hatenablog.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fml-rand-note.hatenablog.com%2Fentry%2Fruby%2Farray-union\" title=\"\u3010Ruby\u3011\u914d\u5217\u306e\u548c\u96c6\u5408\u30fb\u7a4d\u96c6\u5408\u30fb\u5dee\u96c6\u5408\u3092\u6c42\u3081\u308b\u65b9\u6cd5 - \u30e9\u30f3\u30c9ML\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"round-rand","url":"https://ml-rand-note.hatenablog.com/entry/ruby/array-union","author_url":"https://blog.hatena.ne.jp/round-rand/","image_url":null,"provider_name":"Hatena Blog","published":"2026-06-11 00:00:00","description":"\u548c\u96c6\u5408\uff1a| \u7a4d\u96c6\u5408\uff1a& \u5dee\u96c6\u5408\uff1a- \u53c2\u8003 \u548c\u96c6\u5408\uff1a| \u300c\u3069\u3061\u3089\u304b\u306e\u914d\u5217\u306b\u542b\u307e\u308c\u308b\u8981\u7d20\u300d\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002 \u91cd\u8907\u304c\u3042\u308b\u5834\u5408\u306f\u53d6\u308a\u9664\u304b\u308c\u307e\u3059\u3002 a = [1, 2, 3, 3] b = [3, 4, 5] p a | b #=> [1, 2, 3, 4, 5] \u7a4d\u96c6\u5408\uff1a& \u300c\u4e21\u65b9\u306e\u914d\u5217\u306b\u3042\u308b\u8981\u7d20\u300d\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002 a = [1, 2, 3, 3] b = [3, 4, 5] p a & b #=> [3] \u5dee\u96c6\u5408\uff1a- \u300c\u5de6\u5074\u306e\u914d\u5217\u306b\u5b58\u5728\u3057\u3001\u53f3\u5074\u306e\u914d\u5217\u306b\u306f\u5b58\u5728\u3057\u306a\u3044\u8981\u7d20\u300d\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002 a = [1, 2, 3, 3] b = [1, 3, 4] p a - b #=> [2] \u53c2\u8003 docs.ruby-\u2026","blog_title":"\u30e9\u30f3\u30c9ML","width":"100%"}