Comments (5)
@fabiopelosin are you sure .to_i is required? A big downside to that approach is that if the symbol is nil (eg. when $CHILD_STATUS does not exist as a variable) then .to_i will return zero and thus indicate success.
Β§ ruby -e "print nil.to_i == 0 ? 'yes' : 'no'"
yes
Β§ ruby -e 'print $FLUBBER.to_i == 0 ? "yes" : "no"'
yes
If you do need to force to integer for comparison you should probably check for nil first also. I know
from cocoapods-downloader.
@aufflick Thanks... I added the .to_i
expecting to raise a no method error in case of nil
... actually I've read about this behavior but it was completely lost in the inners of my mind.
I will fix it... thanks!
from cocoapods-downloader.
@fabiopelosin I donβt particularly like them, but can we just use the default Ruby globals instead? I.e. $?
in this situation?
from cocoapods-downloader.
@alloy I was planning to go back to $?
as long as we support Ruby 1.8.7 because it is just not worth it (working on another gem I have disabled this check on the cocoapods configuration of RuboCop exactly for this reason).
from cocoapods-downloader.
π
from cocoapods-downloader.
Related Issues (20)
- Error downloading pod using nexus proxy with cdn remote HOT 13
- cURL version issue HOT 11
- Git shallow cloning is not used when branch is set HOT 4
- Feature Requests:Try shallow git clones as much as possible HOT 1
- NoMethodError - undefined method `start_with?' for <Pod::Version version=x.x.x>:Pod::Version HOT 5
- Ignore curlrc config file HOT 2
- Hannabeauty HOT 1
- Download file from a private S3 bucket HOT 3
- download only branch with --depth 1 was not work on cocoapods 1.1.1
- Are remote shares supported? HOT 3
- Usage example not working: undefined method 'cache_root' HOT 1
- CocoaPods hangs on unpacking boost 1.59 when executing pod install HOT 30
- cache root is not working
- `homepage` error in gemspec
- Faulty extraction in remote_file.rb if compressed file contains only .framework HOT 2
- Force curl to use HTTP/1.1 HOT 5
- Feature Request: Rename spec.source HOT 4
- cocoapods checkout wrong branch if pod's branch name is separated by slashes HOT 1
- Unrecognized options [:headers] HOT 3
- Vendored framework not matched when only file in pod source HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cocoapods-downloader.