Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d126b0e80fc9
Choose a base ref
...
head repository: opal/opal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0283a0a235aa
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 15, 2015

  1. Fix #puts without arguments

    This bug went unnoticed in browsers because `console.log` can’t output
    anything without and ending newline.
    elia committed Jan 15, 2015
    Copy the full SHA
    b55e733 View commit details
  2. Add Thread::Queue#each

    elia committed Jan 15, 2015
    Copy the full SHA
    0283a0a View commit details
Showing with 9 additions and 1 deletion.
  1. +5 −1 opal/corelib/io.rb
  2. +4 −0 stdlib/thread.rb
6 changes: 5 additions & 1 deletion opal/corelib/io.rb
Original file line number Diff line number Diff line change
@@ -29,7 +29,11 @@ def print(*args)

def puts(*args)
newline = $/
write args.map { |arg| String(arg).chomp }.concat([nil]).join(newline)
if args.empty?
write $/
else
write args.map { |arg| String(arg).chomp }.concat([nil]).join(newline)
end
nil
end
end
4 changes: 4 additions & 0 deletions stdlib/thread.rb
Original file line number Diff line number Diff line change
@@ -106,6 +106,10 @@ def push(value)

alias << push
alias enq push

def each(&block)
@storage.each(&:block)
end
end

end