title: Ruby 2.3: time_zone.rb:272: warning: circular argument reference - now
body: <p>As part of upgrading a Dockerfile I'm trying to make a specific gem run that contains guides written some 8+ years ago.</p>
  <p>I have found out I have to use Ruby &lt;= 2.3 for it because above that it gives endless syntax errors most probably because of some <a href="https://nithinbekal.com/posts/ruby-2-4-features/" rel="nofollow noreferrer">major changes in 2.4</a>.</p>
  <p>I'm installing Ruby 2.3.8 with <a href="https://rvm.io/" rel="nofollow noreferrer">rvm</a> this way:</p>
  <pre><code># Install libssl-1.0 from 'stretch' repositories (needed for ruby 2.3)
  RUN echo &quot;deb http://deb.debian.org/debian/ stretch main contrib non-free&quot; &gt; /etc/apt/sources.list.d/libssl-legacy.lenter code hereist \
   &amp;&amp; echo &quot;deb-src http://deb.debian.org/debian stretch main contrib non-free&quot; &gt;&gt; /etc/apt/sources.list.d/libssl-legacy.list \
   &amp;&amp; echo &quot;APT::Default-Release &quot;bullseye&quot;;&quot; &gt; /etc/apt/apt.conf.d/libssl-legacy \
   &amp;&amp; apt update &amp;&amp; apt install -y libssl1.0-dev
  
  # Install Ruby 2.3 with RVM (to /usr/local/rvm/rubies/ruby-2.3.8/bin/ruby)
  ENV PATH=&quot;/usr/local/rvm/bin:$PATH&quot;
  ENV rvm_path=&quot;/usr/local/rvm&quot;
  RUN curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - \
   &amp;&amp; curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - \
   &amp;&amp; curl -sSL https://get.rvm.io | bash \
   &amp;&amp; rvm install 2.3
  </code></pre>
  <p>A few days ago I managed to make this guide build without a problem, but I can't seem to make it work now. What am I missing?</p>
  <p>I get the following error while trying to build the gem with 'guides build':</p>
  <pre><code>/usr/local/rvm/gems/ruby-2.3.8/gems/activesupport3.0.20/lib/active_support/values/time_zone.rb:272: warning: circular argument reference - now
  </code></pre>
  <p>It points to this function in time_zone.rb:</p>
  <pre><code> # Method for creating new ActiveSupport::TimeWithZone instance in time zone of +self+ from parsed string. Example:
  #
  #   Time.zone = &quot;Hawaii&quot;                      # =&gt; &quot;Hawaii&quot;
  #   Time.zone.parse('1999-12-31 14:00:00')    # =&gt; Fri, 31 Dec 1999 14:00:00 HST -10:00
  #
  # If upper components are missing from the string, they are supplied from TimeZone#now:
  #
  #   Time.zone.now                 # =&gt; Fri, 31 Dec 1999 14:00:00 HST -10:00
  #   Time.zone.parse('22:30:00')   # =&gt; Fri, 31 Dec 1999 22:30:00 HST -10:00
  def parse(str, now=now)
    date_parts = Date._parse(str)
    return if date_parts.blank?
    time = Time.parse(str, now) rescue DateTime.parse(str)
    if date_parts[:offset].nil?
      ActiveSupport::TimeWithZone.new(nil, self, time)
    else
      time.in_time_zone(self)
    end
  end
  </code></pre>
  <p>ruby -v:</p>
  <pre><code>ruby 2.3.8p459 (2018-10-18 revision 65136) [x86_64-linux]
  </code></pre>
  <p>gem -v:</p>
  <pre><code>3.3.10
  </code></pre>
  <p>bundler -v:</p>
  <pre><code>Bundler version 2.3.10
  </code></pre>