goby-lang / goby

Goby - Yet another programming language written in Go
MIT License
3.49k stars 171 forks source link

Implement dup #791

Closed st0012 closed 4 years ago

st0012 commented 4 years ago

The default dup method returns the receiver object. Mutable data structures like Object, Array, String and Hash have their own implementation to override the default behavior for real duplication.

codecov[bot] commented 4 years ago

Codecov Report

Merging #791 into master will increase coverage by 0.09%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #791      +/-   ##
==========================================
+ Coverage   80.22%   80.31%   +0.09%     
==========================================
  Files          54       54              
  Lines        7397     7431      +34     
==========================================
+ Hits         5934     5968      +34     
  Misses       1236     1236              
  Partials      227      227
Impacted Files Coverage Δ
vm/object.go 80.59% <100%> (+1.23%) :arrow_up:
vm/error.go 70.96% <100%> (ø) :arrow_up:
vm/array.go 96.17% <100%> (+0.05%) :arrow_up:
vm/class.go 85.8% <100%> (+0.17%) :arrow_up:
vm/string.go 98.27% <100%> (+0.01%) :arrow_up:
vm/hash.go 96.81% <100%> (+0.02%) :arrow_up:
vm/environment.go 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e0fd347...3be37e8. Read the comment docs.