Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

Ruby | Numeric | +@

概要

Numeric#+@

詳細

単項演算子のプラス。自身のインスタンスを返却する

サンプルコード
a = 1
puts +a
puts a == +a

出力

1
true