<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kamatimaru</author_name>
  <author_url>https://blog.hatena.ne.jp/kamatimaru/</author_url>
  <blog_title>delhi09の勉強日記</blog_title>
  <blog_url>https://kamatimaru.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>Rubyでは基本的にAND条件とOR条件に&amp;&amp;と||を使います。 他方でandとorも構文ではサポートされています。従って、Python経験がある身としては、andとorを使いそうになってしまうときがあります。 ※ PythonではAND条件とOR条件にはandとorを使う note.nkmk.me しかし、一般的なRubyのコードでandとorを使っているケースはほとんど見ません。Rubocopの標準にもandとorの使用をチェックするルールが存在します。 www.rubydoc.info 従って、なぜ原則は&amp;&amp;と||を使ったほうがよいのかを確認したいと思います。 理由 &amp;&amp;、||、andと…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkamatimaru.hatenablog.com%2Fentry%2F2026%2F01%2F12%2F003726&quot; title=&quot;RubyでAND条件とOR条件にand,orではなく&amp;amp;&amp;amp;,||を使う理由 - delhi09の勉強日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-01-12 00:37:26</published>
  <title>RubyでAND条件とOR条件にand,orではなく&amp;&amp;,||を使う理由</title>
  <type>rich</type>
  <url>https://kamatimaru.hatenablog.com/entry/2026/01/12/003726</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
