This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module X | |
refine Fixnum do | |
def foo; p :foo; end | |
end | |
end | |
module Y | |
refine Fixnum do | |
def bar; p :bar; end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby -v test/openssl/test_ssl.rb | |
ruby 2.0.0dev (2012-11-01 trunk 37417) [i686-linux] | |
Run options: | |
# Running tests: | |
...............test/openssl/test_ssl.rb:24: warning: SSL session is not started yet. | |
............/home/shugo/local/lib/ruby/2.0.0/openssl/buffering.rb:53: warning: SSL session is not started yet. | |
..E... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class C | |
def foo | |
"original" | |
end | |
end | |
module M | |
refine C do | |
def foo | |
"refined" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/compile.c b/compile.c | |
index 16bfcef..eb824ca 100644 | |
--- a/compile.c | |
+++ b/compile.c | |
@@ -954,6 +954,7 @@ new_callinfo(rb_iseq_t *iseq, ID mid, int argc, VALUE block, unsigned long flag) | |
} | |
} | |
ci->vmstat = 0; | |
+ ci->refinements = Qundef; | |
ci->blockptr = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./ruby test/test_timeout.rb | |
Run options: | |
# Running tests: | |
[6/6] TestTimeout#test_timeout_immediate2 = 0.50 s | |
1) Failure: | |
test_timeout_immediate2(TestTimeout) [test/test_timeout.rb:65]: | |
[RuntimeError] exception expected, not | |
Class: <#<Class:0x21da1fbc>> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ~/src/mspec/bin/mspec -t ruby | |
ruby 2.0.0dev (2013-01-11 trunk 38771) [i686-linux] | |
.......................................................................................................................................................................................................................................E.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
socklen_t | |
rsock_unix_sockaddr_len(VALUE path) | |
{ | |
#ifdef __linux__ | |
if (RSTRING_PTR(path)[0] == '\0') { | |
/* abstract namespace; see unix(7) for details. */ | |
return (socklen_t) offsetof(struct sockaddr_un, sun_path) + | |
RSTRING_LEN(path); | |
} | |
else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= $SAFE=4を使わないでください | |
$SAFE=4は一部の方にサンドボックスとして利用されていますが、ブラックリスト方式であるため潜在的な脆弱性が存在します。 | |
このため、doc/security.rdocにも記述されているとおり、サンドボックスとしての利用は推奨されていません。 | |
また、Ruby 2.1では$SAFE=4の機能は削除され、$SAFEに4以上の値を代入すると例外が発生するようになります。 | |
今後は、$SAFE=4を使用しないようにお願いします。 | |
= Don't use $SAFE=4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/compile.c b/compile.c | |
index 2285d28..ace1296 100644 | |
--- a/compile.c | |
+++ b/compile.c | |
@@ -547,6 +547,10 @@ rb_iseq_compile_node(VALUE self, NODE *node) | |
ADD_INSN1(ret, 0, throw, INT2FIX(0) /* continue throw */ ); | |
} | |
else { | |
+ if (iseq->type == ISEQ_TYPE_CLASS) { | |
+ ADD_INSN(ret, iseq->compile_data->last_line, pop); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/tmp/ruby-build.20140125230823.3913 ~ | |
HTTP/1.1 200 OK | |
Content-Type: binary/octet-stream | |
Content-Length: 15076389 | |
Connection: keep-alive | |
Date: Sun, 12 Jan 2014 22:08:31 GMT | |
Last-Modified: Wed, 25 Dec 2013 16:03:08 GMT | |
ETag: "9e6386d53f5200a3e7069107405b93f7" | |
Accept-Ranges: bytes | |
Server: AmazonS3 |