cc 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/file.rb +2 -2
  3. data/kernel.rb +10 -2
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3845aa1ea0a757e0457a34c7a5262a492f0f172b07f143cb5bb01f2e025dcfd2
4
- data.tar.gz: '01603958c108049cdd77b01399ceb6d1ebdf927187b005455fa15cb106df79e9'
3
+ metadata.gz: 77dede409ecd46b343a4db686460784dfc57c41c6a1ab838e104de8589437eb8
4
+ data.tar.gz: 8d33a1927b0907ba6471ba7ed0648624bb354a0b47033a1da4154d3b07d81b1a
5
5
  SHA512:
6
- metadata.gz: 15268def1cc4604f43c243fca0cb66744e64cd186d7679107aab2e7363fe85990c2c1ef6363dc567241943fdb3d730ceff405a3b56c32a1c9e8e51ced79c3f74
7
- data.tar.gz: 338fd1f52a6eed257b3079e6d06b11a471d1cbaa5e326e433fc063e3b8108d65adb10c7b4f64537630c979178878983a4c84b2c2623e3a5280ff1df1d4e4cb35
6
+ metadata.gz: 1b767f4b791f0ab7ab30b5eb6e3a59cca1cfd6089a134ce443724e2c4f0514e587c488cf40e27e2c920a57f9c98129350ac632db88e4e0bf32dfd70f5656bcd5
7
+ data.tar.gz: 90ab407123b667a39e34376086a0067125fce0e8f22ce06f460e0359bedb1a4f8d8137f672f7c174a551cb15230bd5fa21152b90f4bbe0cf00f8496f461c97b1
data/file.rb CHANGED
@@ -121,8 +121,8 @@ class Hash
121
121
  alias :"find?" :find_path
122
122
  end
123
123
 
124
- load('json.rb') # require 'json'
125
- load('yaml.rb') # require 'yaml'
124
+ # load('json.rb') # require 'json'
125
+ # load('yaml.rb') # require 'yaml'
126
126
 
127
127
  class File
128
128
  def self.load_json filepath
data/kernel.rb CHANGED
@@ -76,7 +76,11 @@ module Kernel
76
76
  elsif File.exist?(script_path+'.rb')
77
77
  require_relative script_path+'.rb'
78
78
  else
79
- warn "无法找到路径: #{script_path}"
79
+ begin
80
+ require script_path
81
+ rescue
82
+ warn "无法找到路径: #{script_path}"
83
+ end
80
84
  end
81
85
  end
82
86
 
@@ -94,7 +98,11 @@ module Kernel
94
98
  elsif File.exist?(script_path+'.rb')
95
99
  load script_path+'.rb'
96
100
  else
97
- warn "无法找到路径: #{script_path}"
101
+ begin
102
+ load (script_path[-3..-1]=='.rb' ? script_path : script_path+'.rb')
103
+ rescue
104
+ warn "无法找到路径: #{script_path}"
105
+ end
98
106
  end
99
107
  end
100
108
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-05-12 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: custom-core is a custom library for ruby programming.
13
13
  email:
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0'
53
53
  requirements: []
54
- rubygems_version: 3.6.6
54
+ rubygems_version: 3.6.8
55
55
  specification_version: 4
56
56
  summary: custom core
57
57
  test_files: []