kernel-boolean 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +2 -2
  3. data/README.md +7 -4
  4. data/lib/kernel/boolean.rb +2 -2
  5. metadata +17 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e081dba1b9e18f6f51eed1a770efbc3a638cb7a7455b8db794375d345300f05
4
- data.tar.gz: 8e66d7af4c52f092f1a50f5cc6972af5da28054b86607c717c33676cbd6b0e7b
3
+ metadata.gz: ede8286d52717fac706526e17c7385cc7fb1472340c6933613dbf4f5652aa888
4
+ data.tar.gz: 42986226da482acf128d1406487249405ab62068299673425c819302eeeb9b1a
5
5
  SHA512:
6
- metadata.gz: a1fcc4b4ffd4c88ed942feff0685bd78eb4f298ce0dd0ec102982b3e8abe5714cf194748671ef3a01924af0b8f5fcf3dee58fe33774846ab0f9a8f5cfd6a1efb
7
- data.tar.gz: 6ff29faee0bf807d8d9cf3f2845a18f706cc0be6c4ae742aa3fe5f455d233c66e6637ac86ca786c55e392947ea1c1fa9a6c08f70cff8d542f4b9030e8c80159a
6
+ metadata.gz: e3c155c01a86709a72af8aeee1de82d83ca7bf89ba6256b631356cc82e9376746dc82ffa36bee3cb2eda262ae284db0bf2b2e3a1cee25b057ca96c42da06cd4a
7
+ data.tar.gz: a6c7269160f684c1faa6f8dfd75bdc3716be0b60d8c9dc12c84ba33e1f5b5c0a892f2091d462d3187a8795bee6035ad833f2848485d4c5c88728737772f3501f
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ # The MIT License
2
2
 
3
- Copyright (c) 2022 Cyril Kato
3
+ Copyright (c) 2022-2023 Cyril Kato
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -4,10 +4,9 @@ Returns a boolean based on the given argument.
4
4
 
5
5
  ## Status
6
6
 
7
- [![Version](https://img.shields.io/github/v/tag/cyril/kernel-boolean.rb?label=Version&logo=github)](https://github.com/cyril/kernel-boolean.rb/releases)
7
+ [![Version](https://img.shields.io/github/v/tag/cyril/kernel-boolean.rb?label=Version&logo=github)](https://github.com/cyril/kernel-boolean.rb/tags)
8
8
  [![Yard documentation](https://img.shields.io/badge/Yard-documentation-blue.svg?logo=github)](https://rubydoc.info/github/cyril/kernel-boolean.rb/main)
9
- [![CI](https://github.com/cyril/kernel-boolean.rb/workflows/CI/badge.svg?branch=main)](https://github.com/cyril/kernel-boolean.rb/actions?query=workflow%3Aci+branch%3Amain)
10
- [![RuboCop](https://github.com/cyril/kernel-boolean.rb/workflows/RuboCop/badge.svg?branch=main)](https://github.com/cyril/kernel-boolean.rb/actions?query=workflow%3Arubocop+branch%3Amain)
9
+ [![Ruby](https://github.com/cyril/kernel-boolean.rb/workflows/Ruby/badge.svg?branch=main)](https://github.com/cyril/kernel-boolean.rb/actions?query=workflow%3Aruby+branch%3Amain)
11
10
  [![License](https://img.shields.io/github/license/cyril/kernel-boolean.rb?label=License&logo=github)](https://github.com/cyril/kernel-boolean.rb/raw/main/LICENSE.md)
12
11
 
13
12
  ## Installation
@@ -21,7 +20,7 @@ gem "kernel-boolean"
21
20
  And then execute:
22
21
 
23
22
  ```sh
24
- bundle
23
+ bundle install
25
24
  ```
26
25
 
27
26
  Or install it yourself as:
@@ -68,6 +67,10 @@ The `Kernel` module is included in the `Object` class, so by loading this librar
68
67
 
69
68
  `Kernel#Boolean` uses [Semantic Versioning 2.0.0](https://semver.org/)
70
69
 
70
+ ## See also
71
+
72
+ * [`kernel-symbol`](https://github.com/cyril/kernel-symbol.rb): Returns a `Symbol` based on the given argument.
73
+
71
74
  ## License
72
75
 
73
76
  The [gem](https://rubygems.org/gems/kernel-boolean) is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -24,10 +24,10 @@ module Kernel
24
24
  # Boolean(nil) # => TypeError: can't convert nil into boolean
25
25
  # Boolean("true") # => ArgumentError: invalid value for Boolean(): "true"
26
26
  def Boolean(arg)
27
- return arg if [false, true].include?(arg)
27
+ return true if true.equal?(arg)
28
+ return false if false.equal?(arg)
28
29
 
29
30
  raise ::TypeError, "can't convert nil into boolean" if arg.nil?
30
-
31
31
  raise ::ArgumentError, "invalid value for Boolean(): #{arg.inspect}"
32
32
  end
33
33
  # rubocop:enable Naming/MethodName
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kernel-boolean
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Kato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-24 00:00:00.000000000 Z
11
+ date: 2023-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -39,7 +39,21 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: r_spec-clone
42
+ name: r_spec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop-gitlab-security
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
59
  - - ">="