Skip to content

Commit

Permalink
bug fix added
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikmota committed Mar 10, 2024
1 parent ead5990 commit 3552939
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions evaldo/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -6146,9 +6146,19 @@ var builtins = map[string]*env.Builtin{
}
return makeError(ps, "Tagword not found.")
case env.Block:
s := &wrd.Series
wrd.Series = *s.Append(arg0)
return *env.NewBlock(wrd.Series)
dataSlice := make([]env.Object, 0)
switch blockData := arg0.(type) {
case env.Block:
for _, v1 := range wrd.Series.S {
dataSlice = append(dataSlice, env.ToRyeValue(v1))
}
for _, v2 := range blockData.Series.S {
dataSlice = append(dataSlice, env.ToRyeValue(v2))
}
default:
return makeError(ps, "Need to pass block of data")
}
return *env.NewBlock(*env.NewTSeries(dataSlice))
case env.String:
finalStr := ""
switch str := arg0.(type) {
Expand Down

0 comments on commit 3552939

Please sign in to comment.