Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Array.new(args) #832

Merged
merged 1 commit into from
Mar 1, 2020
Merged

Support Array.new(args) #832

merged 1 commit into from
Mar 1, 2020

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Mar 1, 2020

This PR supports multiple ways to initialize an Array:

Array.new(3) #=> [nil, nil, nil]
Array.new(3, true) #=> [true, true, true]
Array.new(3) do |i|
  i * 2
end #=> [0, 2, 4]

Closes #831

@st0012 st0012 added this to the version 0.1.13 milestone Mar 1, 2020
@st0012 st0012 requested a review from hachi8833 March 1, 2020 07:38
@st0012 st0012 self-assigned this Mar 1, 2020
vm/array.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 1, 2020

Codecov Report

Merging #832 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #832      +/-   ##
=========================================
+ Coverage   80.85%   80.9%   +0.05%     
=========================================
  Files          54      54              
  Lines        7405    7425      +20     
=========================================
+ Hits         5987    6007      +20     
  Misses       1193    1193              
  Partials      225     225
Impacted Files Coverage Δ
vm/array.go 96.34% <100%> (+0.11%) ⬆️

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 4c2bd49...7c4cff3. Read the comment docs.

Copy link
Member

@hachi8833 hachi8833 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked this and LGTM 👍

@st0012
Copy link
Member Author

st0012 commented Mar 1, 2020

@hachi8833 thanks 👍

@st0012 st0012 merged commit 7ec45dd into master Mar 1, 2020
@st0012 st0012 deleted the implement-#831 branch March 1, 2020 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Array.new with an argument
3 participants