diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-17 14:35:02 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-17 14:35:02 +0000 |
commit | 7d5fad1bc5b45468b1c80901f82291dbea94d27a (patch) | |
tree | 48bb80df57362a7a307a8781d0e07bb55ee3d19e | |
parent | 8340078cc877bc082df80ac3474b6b9647868f7c (diff) | |
download | ruby-7d5fad1bc5b45468b1c80901f82291dbea94d27a.tar.gz |
sample/trick2018/03-tompng: merge upstream fixes
* Remove `ruby '2.5.0'`
* Add `source 'https://rubygems.org'`
* Avoid `Kernel#Integer`
Thanks to tompng. Fixes #14930.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | sample/trick2018/03-tompng/Gemfile | 2 | ||||
-rw-r--r-- | sample/trick2018/03-tompng/Gemfile.lock | 4 | ||||
-rw-r--r-- | sample/trick2018/03-tompng/entry.rb | 4 |
3 files changed, 4 insertions, 6 deletions
diff --git a/sample/trick2018/03-tompng/Gemfile b/sample/trick2018/03-tompng/Gemfile index 983f2f3bd4..a24ff779dc 100644 --- a/sample/trick2018/03-tompng/Gemfile +++ b/sample/trick2018/03-tompng/Gemfile @@ -1,2 +1,2 @@ -ruby '2.5.0' +source 'https://rubygems.org' gem 'chunky_png' diff --git a/sample/trick2018/03-tompng/Gemfile.lock b/sample/trick2018/03-tompng/Gemfile.lock index 6f54c44066..467f5c3495 100644 --- a/sample/trick2018/03-tompng/Gemfile.lock +++ b/sample/trick2018/03-tompng/Gemfile.lock @@ -1,4 +1,5 @@ GEM + remote: https://rubygems.org/ specs: chunky_png (1.3.8) @@ -8,8 +9,5 @@ PLATFORMS DEPENDENCIES chunky_png -RUBY VERSION - ruby 2.5.0p0 - BUNDLED WITH 1.16.1 diff --git a/sample/trick2018/03-tompng/entry.rb b/sample/trick2018/03-tompng/entry.rb index 2d7b209b73..26416c7019 100644 --- a/sample/trick2018/03-tompng/entry.rb +++ b/sample/trick2018/03-tompng/entry.rb @@ -1,7 +1,7 @@ X=[];class String def-@;replace ?-+self end;def-a;X.reject!{|x|x. __id__==__id__};a.replace(self+?-+a) end end;at_exit{eval C=(Zlib -.inflate Integer((X*?-).tr(?-,'').tr('q-z','0-9'),26).digits(256) -.pack'C*')};def method_missing n;(X<<n.to_s)[-1]end;require'zlib' +.inflate((X*?-).tr(?-,'').tr('q-z','0-9').to_i(26).digits(0x100). +pack'C*'))};def method_missing n;(X<<n.to_s)[-1]end;require'zlib' fzygtoxyzgntmdmuwvfoffbpmvzojpkhczvjvjdbtscnldwbdoprackddovivvmkz ponzmosvtjciwkgaslscxxxwudeesmmqpfhislxuxnnypulxstzgobyaekqqhbjcg mvko------------ddkeys----eivhnccaqyiw---bzyccmt-----------ymtnge |