We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
1 parent 79e61db commit 8d72393Copy full SHA for 8d72393
stdlib/native.rb
@@ -193,6 +193,18 @@ def []=(key, value)
193
end
194
195
196
+ def merge!(other)
197
+ %x{
198
+ var other = #{Native.convert(other)};
199
+
200
+ for (var prop in other) {
201
+ #@native[prop] = other[prop];
202
+ }
203
204
205
+ self
206
+ end
207
208
def respond_to?(name, include_all = false)
209
Kernel.instance_method(:respond_to?).bind(self).call(name, include_all)
210
0 commit comments