rb_lovely 0.5.0 → 0.6.1

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
  SHA1:
3
- metadata.gz: fc4258b3c5efab8a5b29067b61e51c0c9660de33
4
- data.tar.gz: 1065affd37a40bde5b1b188c64fd0b69a6aadd99
3
+ metadata.gz: a101665aa179ecfdd7edfce739f5f2feee1af73d
4
+ data.tar.gz: 819f929306b9aeef392d0325e311badac9e4c019
5
5
  SHA512:
6
- metadata.gz: f5fdd5429e26c7beeb8d37be5e614f2b553a6d21bcd7784f39e538be882c00748c90d47da312412b538ec43095d3f92e4b67da70ff54d20d16449141d080a4c8
7
- data.tar.gz: 80d8f021ca4f675b336838893f9f5b5dcd2d29d74c536d83edc59908071a838399115f30c808f8784eae18220a55f5892be22d8371588c7cc22573df665753f1
6
+ metadata.gz: 26d39b7cee7223eb6e66cd5e7fecac58e59fcc3e9880e24c3c120e582ca590492d2f38fab8607ee03be02eca2747327841d6238cbda17db94cdd3f2aee0e035f
7
+ data.tar.gz: ba9d4986fce10cf32ea1c268cfa5e85301d28baa1d547646d1d9b4fe87167374d496e53ff806c43cd4c837a5d74f39319089872201f3396c6a63d4e9c3ea7636
@@ -1,10 +1,12 @@
1
- #ifndef RB_LOVELY_SETS_CONTAINER_HPP
2
- #define RB_LOVELY_SETS_CONTAINER_HPP
1
+ #ifndef RB_LOVELY_CONTAINER_HPP
2
+ #define RB_LOVELY_CONTAINER_HPP
3
3
 
4
4
  #include "ruby_util.hpp"
5
5
 
6
6
  namespace rb_lovely {
7
7
 
8
+ // TODO: No more toS, provide inspect instead which is what the containers should be using
9
+ // for each member.
8
10
  auto toS = [](VALUE val) { return RSTRING_PTR(rb_funcall(val, to_sSym, 0)); };
9
11
 
10
12
  }
@@ -2,6 +2,8 @@ require 'mkmf'
2
2
  $CPPFLAGS += ' -std=c++0x'
3
3
  with_cflags('-x c++') do
4
4
  # needed for SortedHash, optional
5
- have_header('boost/multi_index_container.hpp')
5
+ unless have_header 'boost/multi_index_container.hpp'
6
+ warn 'Could not find boost, disabling SortedHash'
7
+ end
6
8
  end
7
9
  create_makefile('rb_lovely')
@@ -1,5 +1,5 @@
1
- #ifndef RB_LOVELY_SETS_UTIL_HPP
2
- #define RB_LOVELY_SETS_UTIL_HPP
1
+ #ifndef RB_LOVELY_UTIL_HPP
2
+ #define RB_LOVELY_UTIL_HPP
3
3
  #include "ruby.h"
4
4
 
5
5
  namespace rb_lovely {
@@ -183,7 +183,7 @@ VALUE hashLast(VALUE self) {
183
183
  return last->val;
184
184
  }
185
185
 
186
- VALUE hashMutatingDelete(VALUE self, VALUE toDelete) {
186
+ VALUE hashDelete(VALUE self, VALUE toDelete) {
187
187
  Hash* hash = rubyCast<Hash>(self);
188
188
  auto it = hash->container.find(toDelete);
189
189
  if (it == hash->container.end()) {
@@ -256,7 +256,7 @@ extern "C" {
256
256
  rb_define_method(rbHash, "to_s", RUBY_METHOD_FUNC(hashToString), 0);
257
257
  rb_define_method(rbHash, "first", RUBY_METHOD_FUNC(hashFirst), 0);
258
258
  rb_define_method(rbHash, "last", RUBY_METHOD_FUNC(hashLast), 0);
259
- rb_define_method(rbHash, "delete", RUBY_METHOD_FUNC(hashMutatingDelete), 1);
259
+ rb_define_method(rbHash, "delete", RUBY_METHOD_FUNC(hashDelete), 1);
260
260
  // rb_define_method(rbHash, "reject!", RUBY_METHOD_FUNC(hashMutatingReject), 0);
261
261
  // rb_define_method(rbHash, "reject_first!", RUBY_METHOD_FUNC(hashMutatingRejectFirst), 0);
262
262
  // rb_define_method(rbHash, "select!", RUBY_METHOD_FUNC(hashMutatingSelect), 0);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb_lovely
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Pike
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-02 00:00:00.000000000 Z
11
+ date: 2014-09-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A fast sorted set built using std::set and a fast sorted hash built using
14
14
  boost::multi_index_container.