---
title: "Discussion on \"Ruby |= pipe assignment operator\" | Hashnode"
description: "Discussion on \"Ruby |= pipe assignment operator\". irb(main):021> arr = [3]\n=> [3]\nirb(main):022> arr |= [3]\n=> [3]\nirb(main):023> arr |= [3, 2]\n=> [3, 2]\nirb(main):024> arr |= [3, 2]\n=> [3, 2]"
url: "https://hashnode.com/posts/ruby-pipe-assignment-operator/693a6e7c7d699abf5b6e4982"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Ruby |= pipe assignment operator](https://tenzinchemi.in/ruby-pipe-assignment-operator?utm_source=hashnode&utm_medium=feed)

irb(main):021> arr = \[3\] => \[3\] irb(main):022> arr |= \[3\] => \[3\] irb(main):023> arr |= \[3, 2\] => \[3, 2\] irb(main):024> arr |= \[3, 2\] => \[3, 2\]

Dec 11, 2025 · 1 min read · tenzinchemi.in  
Read the article

-   [#ruby](https://hashnode.com/tag/ruby)

## Written by

[Tenzin Chemi](https://hashnode.com/@imechemi)

@imechemi

  
[View profile](https://hashnode.com/@imechemi)

I write softwares

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
