Skip to content

Commit 38b144f

Browse files
committed
1 parent 853bef3 commit 38b144f

5 files changed

Lines changed: 95 additions & 94 deletions

File tree

4.x/bindings/methods/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3635,6 +3635,7 @@ <h2 id="default-arguments">Default Arguments<a class="headerlink" href="#default
36353635
<a id="__codelineno-2-4" name="__codelineno-2-4" href="#__codelineno-2-4"></a><span class="p">);</span>
36363636
</code></pre></div>
36373637
<p>These <code>Rice::Arg</code> objects must be in the correct positional order. Thus if the second argument has a default value, then there must be two Arg objects.</p>
3638+
<p>Note that Rice stores a copy of default values internally, so the type must be copyable. Types with deleted or private copy constructors cannot be used as default arguments. This includes types that inherit from non-copyable base classes. If you need to wrap a function with a non-copyable default parameter, you'll need to omit the default value and require Ruby callers to always provide that argument explicitly.</p>
36383639
<p>Now, Ruby will now know about the default arguments, and this wrapper can be used as expected:</p>
36393640
<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="n">t</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="no">Test</span><span class="o">.</span><span class="n">new</span>
36403641
<a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a><span class="n">t</span><span class="o">.</span><span class="n">hello</span><span class="p">(</span><span class="s2">&quot;hello&quot;</span><span class="p">)</span>

4.x/changelog/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -765,10 +765,10 @@
765765
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
766766

767767
<li class="md-nav__item">
768-
<a href="#491-unreleased" class="md-nav__link">
768+
<a href="#491-2026-01-04" class="md-nav__link">
769769
<span class="md-ellipsis">
770770

771-
4.9.1 (unreleased)
771+
4.9.1 (2026-01-04)
772772

773773
</span>
774774
</a>
@@ -3899,7 +3899,7 @@
38993899

39003900

39013901
<h1 id="changelog">Changelog<a class="headerlink" href="#changelog" title="Permanent link">&para;</a></h1>
3902-
<h2 id="491-unreleased">4.9.1 (unreleased)<a class="headerlink" href="#491-unreleased" title="Permanent link">&para;</a></h2>
3902+
<h2 id="491-2026-01-04">4.9.1 (2026-01-04)<a class="headerlink" href="#491-2026-01-04" title="Permanent link">&para;</a></h2>
39033903
<p>This release focuses on improving memory management for STL containers and attribute setters.</p>
39043904
<p>Enhancements:
39053905
* Support <code>takeOwnership</code> and <code>keepAlive</code> when setting attributes via <code>Arg("value").takeOwnership()</code> and <code>Arg("value").keepAlive()</code>

4.x/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)