Skip to content

Commit

Permalink
Periodic Merge branch 'master' into ffi-io
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckremes committed Jan 8, 2016
2 parents 37e42ce + da81b5d commit 1c5650b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dockerfiles/ubuntu/14.04/Dockerfile
@@ -1,8 +1,8 @@
FROM ubuntu:14.04

ADD https://rubinius-binaries-rubinius-com.s3-us-west-2.amazonaws.com/ubuntu/14.04/x86_64/rubinius-3.2.tar.bz2 /tmp/rubinius.tar.bz2
ADD https://rubinius-binaries-rubinius-com.s3-us-west-2.amazonaws.com/ubuntu/14.04/x86_64/rubinius-3.3.tar.bz2 /tmp/rubinius.tar.bz2
RUN apt-get -y install bzip2 && cd /opt && tar xvjf /tmp/rubinius.tar.bz2

ENV PATH /opt/rubinius/3.2/bin:/opt/rubinius/3.2/gems/bin:$PATH
ENV PATH /opt/rubinius/3.3/bin:/opt/rubinius/3.3/gems/bin:$PATH

CMD ["bash"]
4 changes: 2 additions & 2 deletions dockerfiles/ubuntu/15.10/Dockerfile
@@ -1,8 +1,8 @@
FROM ubuntu:15.10

ADD https://rubinius-binaries-rubinius-com.s3-us-west-2.amazonaws.com/ubuntu/15.10/x86_64/rubinius-3.2.tar.bz2 /tmp/rubinius.tar.bz2
ADD https://rubinius-binaries-rubinius-com.s3-us-west-2.amazonaws.com/ubuntu/15.10/x86_64/rubinius-3.3.tar.bz2 /tmp/rubinius.tar.bz2
RUN apt-get -y install bzip2 && cd /opt && tar xvjf /tmp/rubinius.tar.bz2

ENV PATH /opt/rubinius/3.2/bin:/opt/rubinius/3.2/gems/bin:$PATH
ENV PATH /opt/rubinius/3.3/bin:/opt/rubinius/3.3/gems/bin:$PATH

CMD ["bash"]
2 changes: 1 addition & 1 deletion gems_list.txt
Expand Up @@ -93,7 +93,7 @@ rubysl-securerandom-2.0.0.gem
rubysl-set-2.0.1.gem
rubysl-shellwords-2.0.0.gem
rubysl-singleton-2.0.0.gem
rubysl-socket-2.0.1.gem
rubysl-socket-2.1.0.gem
rubysl-stringio-2.0.0.gem
rubysl-strscan-2.0.0.gem
rubysl-sync-2.0.0.gem
Expand Down
2 changes: 1 addition & 1 deletion vm/instructions.def
Expand Up @@ -162,7 +162,7 @@ end

instruction goto_if_nil(location) [ value -- ] => branch
Object* t1 = stack_pop();
if(t1 == cNil) {
if(t1->nil_p()) {
store_ip(location);
}
end
Expand Down
7 changes: 5 additions & 2 deletions vm/oop.hpp
Expand Up @@ -93,7 +93,10 @@ Object* const cUndef = reinterpret_cast<Object*>(0x22L);

// Indicates the mask to use to check if a value is ruby false.
// This mask matches both false and nil ONLY.
#define FALSE_MASK 0xf
#define FALSE_MASK 0xf

// The bits that identify any nil value.
#define NIL_MASK 0x1f

#define CBOOL(v) (((uintptr_t)(v) & FALSE_MASK) != (uintptr_t)cFalse)
#define RBOOL(v) ((v) ? cTrue : cFalse)
Expand Down Expand Up @@ -586,7 +589,7 @@ Object* const cUndef = reinterpret_cast<Object*>(0x22L);
void wait(STATE);

bool nil_p() const {
return this == reinterpret_cast<ObjectHeader*>(cNil);
return (reinterpret_cast<intptr_t>(this) & NIL_MASK) == reinterpret_cast<intptr_t>(cNil);
}

bool true_p() const {
Expand Down

0 comments on commit 1c5650b

Please sign in to comment.