$ brew install imagemagick@6
$ gem install nokogiri rmagick
(画像サイズの取得に RMagick を使用していて、それに imagemagick@6
が必要になります。)
FROM amazonlinux:2018.03 | |
RUN yum install -y git gcc ruby24-devel ImageMagick ImageMagick-devel | |
WORKDIR /opt/rmagick |
$ rake | |
mkdir -p tmp/x86_64-darwin17/RMagick2/2.3.8 | |
cd tmp/x86_64-darwin17/RMagick2/2.3.8 | |
/Users/watson/.rbenv/versions/2.3.8/bin/ruby -I. ../../../../ext/RMagick/extconf.rb | |
checking for brew... yes | |
checking for clang... yes | |
checking for pkg-config... yes | |
checking for outdated ImageMagick version (<= 6.7.7)... no | |
Usage: file [-bcEhikLlNnprsvzZ0] [-e test] [-f namefile] [-F separator] [-m magicfiles] [-M magicfiles] file... | |
file -C -m magicfiles |
Process: ruby [39632] | |
Path: /Users/USER/*/ruby | |
Identifier: ruby | |
Version: 0 | |
Code Type: X86-64 (Native) | |
Parent Process: ruby [39604] | |
Responsible: ruby [39632] | |
User ID: 501 | |
Date/Time: 2019-05-25 17:53:43.230 +0900 |
class Foo < String | |
ARG = ' '.freeze | |
def split(arg) | |
a = arg.source | |
if a == ARG | |
arg = ARG | |
end | |
super(arg) | |
end | |
end |
diff --git a/vm_eval.c b/vm_eval.c | |
index a8764e2fa4..a278fe3a2e 100644 | |
--- a/vm_eval.c | |
+++ b/vm_eval.c | |
@@ -46,6 +46,7 @@ rb_vm_call0(rb_execution_context_t *ec, VALUE recv, ID id, int argc, const VALUE | |
struct rb_calling_info calling_entry, *calling; | |
struct rb_call_info ci_entry; | |
struct rb_call_cache cc_entry; | |
+ VALUE val; | |
ruby$target:::method-entry | |
{ | |
printf("method: %s#%s\n", copyinstr(arg0), copyinstr(arg1)); | |
} |
#line 1 "narray/gen/tmpl/lib.c" | |
/* | |
Ruby/Cumo::GSL - GSL wrapper for Ruby/Cumo::NArray | |
created on: 2017-03-11 | |
Copyright (C) 2017 Masahiro Tanaka | |
Copyright (C) 2018 Naotoshi Seo | |
*/ |
def detect_project_root(path) | |
path = File.dirname(path) | |
if Dir.glob(File.join(path, ".git")).count > 0 | |
return path | |
end | |
return nil if path == "/" | |
detect_project_root(path) | |
end |
require 'benchmark/ips' | |
Benchmark.ips do |x| | |
x.report "Hash" do |loop| | |
{foo: 42, bar: "hello", baz: "test"} | |
end | |
end |