# Stupid typos

**URL:** <https://forums.sketchup.com/t/stupid-typos/344266>\
**Category:** Ruby API\
**Created:** [January 30, 2026, 4:37pm UTC](https://forums.sketchup.com/t/stupid-typos/344266 "2026-01-30T16:37:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdamB](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/adamb/32/7118_2.png) [@AdamB](https://forums.sketchup.com/u/AdamB)\
**Post date:** [January 30, 2026, 4:37pm UTC](https://forums.sketchup.com/t/stupid-typos/344266/1 "2026-01-30T16:37:34Z")

</div>

Well that took me 10 minutes to figure why setting a new attribute was always showing the same value as what was already set….

```auto
old = ent.get_attribute(dict, key, value, nil)	
if (old != value)
  puts "It changed!"
  ent.set_attribute(dict, key, value)
end

```

Doh! But what is the forth argument to get\_attribute?

---

<div class="post-metadata">

**Author:** ![AdamB](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/adamb/32/7118_2.png) [@AdamB](https://forums.sketchup.com/u/AdamB)\
**Post date:** [January 30, 2026, 4:48pm UTC](https://forums.sketchup.com/t/stupid-typos/344266/2 "2026-01-30T16:48:04Z")

</div>

> [@AdamB](#):
>
> `get_attribute`

So the docs say it takes 2 args plus an optional default value…

But it happily consumes 4 arguments. Is that a bug?

---

<div class="post-metadata">

**Author:** ![dezmo](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/dezmo/32/51058_2.png) [@dezmo](https://forums.sketchup.com/u/dezmo)\
**Post date:** [January 30, 2026, 5:25pm UTC](https://forums.sketchup.com/t/stupid-typos/344266/3 "2026-01-30T17:25:05Z")

</div>

Yes, it should “normally” return ArgumentError.  
But, besides accepting more parameters, it does the original function - as if you only gave 3 parameters.So, I think it’s a bug that doesn’t affect much, however, if you give too many parameters, you confuse yourself.

The doc always said 2 +1 optional parameters -as far as I remember. I wonder where you got the idea that you need a fourth one?

---

<div class="post-metadata">

**Author:** ![slbaumgartner](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/slbaumgartner/32/7302_2.png) [@slbaumgartner](https://forums.sketchup.com/u/slbaumgartner)\
**Post date:** [January 30, 2026, 7:36pm UTC](https://forums.sketchup.com/t/stupid-typos/344266/4 "2026-01-30T19:36:50Z")

</div>

Most likely the method was programmed as get\_attribute(dict, key, \*args). The “splat” in the third place allows a variable number of subsequent arguments that the method receives as an Array. It can read the first element of the Array and ignore the rest.
