crystalruby 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca096d0563b6201c3ef4f084fff3304cfa212fda88e81085580b2de5ff10536f
4
- data.tar.gz: ccc68dc96c30f973c9bafcbaec75a2461bbaa275e32913a0781c4cc5488f034f
3
+ metadata.gz: '0499023eb26e35e6db77566876a96357202c0e6cdfafbb49d2aaa67e070c38cd'
4
+ data.tar.gz: 4e5f185097b4ad5091b079fc87b43d8d950119c7fbe659a7d76fe473d8cc7cd9
5
5
  SHA512:
6
- metadata.gz: 134e9888d563673d78dc0b9075a239ee3bab6c4a07eb63ff903c748b97684ec87e9bb33011e9f276504f855edd2a25c29860ebc626aa181f74350f68ace8b9e8
7
- data.tar.gz: f3f7a25d12459178e5c8d3cb6a46cfa0e375f65099cdcde15c834a1ba0872198b8475919ec7e5472fa10529bfb71ede67e0edfb88105be5eb220226f2d0ba4ad
6
+ metadata.gz: 0d27665a59a9ecc7345bcca13c5e057d71166684350d54bc158bcefe82655025fc6a8c7fd08069f92c17abe849ad465ee995f223b32391e3f49f2ff7f30c8b92
7
+ data.tar.gz: ee56f2aead72e533e989b3e80c9550a65fcf78b2677dc070f697d656b1293eefecf0782fa43ac45255fced794a6a54040c32e21571723a1208b3d27babe71851
data/README.md CHANGED
@@ -87,7 +87,7 @@ module Cache
87
87
  end
88
88
 
89
89
  crystalize [key: :string, value: :string] => :string
90
- def redis_set_and_return(key)
90
+ def redis_set_and_return(key, value)
91
91
  redis = Redis::Client.new
92
92
  redis.set(key, value)
93
93
  Cache.redis_get(key)
@@ -465,7 +465,7 @@ bundle exec crystalruby clean
465
465
 
466
466
  ## Design Goals
467
467
 
468
- `crystalruby`'s primary purpose is provide ergonomic access to Crystal from Ruby, over FFI.
468
+ `crystalruby`'s primary purpose is to provide ergonomic access to Crystal from Ruby, over FFI.
469
469
  For simple usage, advanced knowledge of Crystal should not be required.
470
470
 
471
471
  However, the abstraction it provides should remain simple, transparent, and easy to hack on and it should not preclude users from supplementing its capabilities with a more direct integration using ffi primtives.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Crystalruby
4
- VERSION = "0.1.9"
4
+ VERSION = "0.1.10"
5
5
  end
data/lib/crystalruby.rb CHANGED
@@ -86,7 +86,10 @@ module CrystalRuby
86
86
  receiver.prepend(Module.new do
87
87
  define_method(method_name) do |*args|
88
88
  CrystalRuby.compile! unless CrystalRuby.compiled?
89
- CrystalRuby.attach! unless CrystalRuby.attached?
89
+ unless CrystalRuby.attached?
90
+ CrystalRuby.attach!
91
+ return send(method_name, *args) if block
92
+ end
90
93
  args.each_with_index do |arg, i|
91
94
  args[i] = function[:arg_maps][i][arg] if function[:arg_maps][i]
92
95
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crystalruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wouter Coppieters