i18nema 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/i18nema/i18nema.c +1 -1
- data/test/i18nema_test.rb +3 -3
- metadata +1 -1
data/ext/i18nema/i18nema.c
CHANGED
@@ -74,7 +74,7 @@ hash_to_rhash(i_object_t *hash)
|
|
74
74
|
i_key_value_t *handle = hash->data.hash;
|
75
75
|
VALUE result = rb_hash_new();
|
76
76
|
for (; handle != NULL; handle = handle->hh.next)
|
77
|
-
rb_hash_aset(result,
|
77
|
+
rb_hash_aset(result, ID2SYM(rb_intern(handle->key)), i_object_to_robject(handle->value));
|
78
78
|
return result;
|
79
79
|
}
|
80
80
|
|
data/test/i18nema_test.rb
CHANGED
@@ -11,17 +11,17 @@ class I18nemaTest < Test::Unit::TestCase
|
|
11
11
|
asdf
|
12
12
|
qwerty
|
13
13
|
}
|
14
|
-
}
|
14
|
+
}
|
15
15
|
@backend = I18nema::Backend.new
|
16
16
|
@backend.store_translations :en, @data
|
17
17
|
end
|
18
18
|
|
19
19
|
def test_yaml_parity
|
20
|
-
assert_equal({
|
20
|
+
assert_equal({en: @data}, @backend.direct_lookup)
|
21
21
|
end
|
22
22
|
|
23
23
|
def test_scoping
|
24
|
-
assert_equal({
|
24
|
+
assert_equal({bar: "lol"},
|
25
25
|
@backend.direct_lookup("en", "foo"))
|
26
26
|
assert_equal "lol",
|
27
27
|
@backend.direct_lookup("en", "foo", "bar")
|